code: def login(self, username, json_document):
          
          url = '{}u/{}'.format(self.url, username)
          make_request(
              url, method='PUT', body=json_document, timeout=self.timeout)
docs: Send user identity information to the identity manager.
  
          Raise a ServerError if an error occurs in the request process.
  
          @param username The logged in user.
          @param json_document The JSON payload for login.