Login almost finished. 
Connection to server working for JSON requests.