public function connect()
	{
		$request  = $this->sendRequest($this->baseUrl."/auth", array('username' => $this->login, 'password' => $this->password), 2);

		$response = json_decode($request['body'], true);
		if (array_key_exists('error', $response))
		{
			throw new \Exception('Erreur '.$response['code'].' : '.$response['error']);
		} else {
			$this->token = $response['token'];
			$this->saveToken();
		}
	}