<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def login(self, username, password=None, blob=None, zeroconf=None):
 """Authenticate to Spotify's servers. You can login with one of three combinations: - ``username`` and ``password`` - ``username`` and ``blob`` - ``username`` and ``zeroconf`` To get the ``blob`` string, you must once log in with ``username`` and ``password``. You'll then get the ``blob`` string passed to the :attr:`~ConnectionCallbacks.new_credentials` callback. """


        username = utils.to_char(username)

        if password is not None:
            password = utils.to_char(password)
            spotifyconnect.Error.maybe_raise(
                lib.SpConnectionLoginPassword(
                    username, password))
        elif blob is not None:
            blob = utils.to_char(blob)
            spotifyconnect.Error.maybe_raise(
                lib.SpConnectionLoginBlob(username, blob))
        elif zeroconf is not None:
            spotifyconnect.Error.maybe_raise(
                lib.SpConnectionLoginZeroConf(
                    username, *zeroconf))
        else:
            raise AttributeError(
                "Must specify a login method (password, blob or zeroconf)")