protected function doLogin() {
    if ($this->user) {
      $request = ObjectFactory::getNewInstance('request');
      $request->setAction('login');
      $request->setValues([
        'login' => $this->user['login'],
        'password' => $this->user['password']
      ]);
      $response = $this->doRemoteCall($request, true);
      if ($response->getValue('success')) {
        $this->sessionId = $response->getValue('sid');
        return true;
      }
    }
    else {
      throw new \RuntimeException("Remote user required for remote call.");
    }
  }