Cleaned up some auth code on the server
Added some JSON parsing to get the API key from the server and stored it, as well as checking the key before login