public function authenticate($login, $password)
    {
        $defaultHttpHeaders                       = $this->defaultHttpHeaders;
        $this->defaultHttpHeaders['Content-Type'] = 'application/x-www-form-urlencoded';
        $this->setPostFields(http_build_query(['username' => $login, 'password' => $password]));
        $result                                   = $this->performRequest('authenticate',
            'POST', 'xml');
        $this->defaultHttpHeaders                 = $defaultHttpHeaders;
        if (!empty($result['message'])) {
            $this->addStatusMessage($result['message'],
                $result['success'] == 'true' ? 'success' : 'warning' );
        }
        return array_key_exists('success', $result) && $result['success'] == 'true';
    }