login now uses HttpClient for sending requests