public function authenticate($site, $login, $password, $baseUrl = null, $version = null) {
    if (empty($site) || empty($login) || empty($password)) {
      throw new InvalidArgumentException('You must specify authentication details.');
    }

    if (isset($baseUrl)) {
      $this->setOption('base_url', $baseUrl);
    }

    if (isset($version)) {
      $this->setOption('version', $version);
    }

    $this->getHttpClient()->authenticate($site, $login, $password);
  }