def login(username, password)
      response = request_json(
        '/api/v1/login',
        method: :post,
        body: {
          username: username,
          password: password
        }
      )
      Session.new self, Token.new(response['data'])
    end
def login(username, password)
      response = request_json(
        '/api/v1/login',
        method: :post,
        body: {
          username: username,
          password: password
        }
      )
      Session.new self, Token.new(response['data'])
    end
Login REST API
 @param [String] username Username
 @param [String] password Password
 @return [Session] Rocket.Chat Session
 @raise [HTTPError, StatusError]