def _login(self, auth: tuple[str, str]):
        """
        Logs in to `utils.LOGIN_URL` using provided `auth` credentials.
        Warning: This method overwrites `self.cookies`.
        """
        resp = httpx.post(
            urllib.parse.urljoin(self.src, utils.LOGIN_URL),
            data={"username": auth[0], "password": auth[1]},
            verify=self.ssl_verify,
            **self.httpx_kwargs,
        )
        if not resp.is_success:
            if resp.status_code == 401:
                raise AuthenticationError(
                    f"Could not login to {self.src}. Invalid credentials."
                )
            else:
                raise ValueError(f"Could not login to {self.src}.")
        self.cookies = {
            name: value for name, value in resp.cookies.items() if value is not None
        }

        Logs in to `utils.LOGIN_URL` using provided `auth` credentials.
        Warning: This method overwrites `self.cookies`.
        
client/python/gradio_client/client.py