code: def login(self):
          
          authtype = self.lookup(self.profile, 'authtype')
          if authtype is None:
              cert = self.lookup(self.profile, 'cert')
              if cert and os.path.isfile(os.path.expanduser(cert)):
                  authtype = 'ssl'
              # Note: official koji cli is a little more lax here. If authtype is
              # None and we have a valid kerberos ccache, we still try kerberos
              # auth.
          if authtype == 'kerberos':
              # Note: we don't try the old-style kerberos login here.
              result = yield self._gssapi_login()
          elif authtype == 'ssl':
              result = yield self._ssl_login()
          else:
              raise NotImplementedError('unsupported auth: %s' % authtype)
          self.session_id = result['session-id']
          self.session_key = result['session-key']
          self.callnum = 0  # increment this on every call for this session.
          defer.returnValue(True)
docs: Return True if we successfully logged into this Koji hub.
  
          We support GSSAPI and SSL Client authentication (not the old-style
          krb-over-xmlrpc krbLogin method).
  
          :returns: deferred that when fired returns True