Moved authorization code around
Added code to hit the webserver's API. Seems to work