code: def login(self, login, password, set_auth=False):
          
          rv = self.session.post(
              self.host,
              dumps({
                  "method": "common.db.login",
                  "params": [login, password]
              }),
          )
          rv = loads(rv.content)['result']
          if set_auth:
              self.set_auth(
                  SessionAuth(login, *rv)
              )
          return rv
docs: Attempts a login to the remote server
          and on success returns user id and session
          or None
  
          Warning: Do not depend on this. This will be deprecated
          with SSO.
  
          param set_auth: sets the authentication on the client