code: def jsonRpcLogin(self, remote):
          
          session = False
          try:
              params = {"username": self.remotes[remote][
                  'username'], "password": self.remotes[remote]['password']}
              response = self._rpcfunctions.jsonRpcPost(
                  self.remotes[remote]['ip'], self.remotes[remote].get('jsonport', DEFAULT_JSONPORT), "Session.login", params)
              if response['error'] is None and response['result']:
                  session = response['result']
  
              if not session:
                  LOG.warning(
                      "ServerThread.jsonRpcLogin: Unable to open session.")
          except Exception as err:
              LOG.debug(
                  "ServerThread.jsonRpcLogin: Exception while logging in via JSON-RPC: %s" % str(err))
          return session
docs: Login to CCU and return session