Changes to login process

Changes made to the login process to allow for two simultaneous login
states. The first relating to the web site, the second to the api.
This gives the user the ability to be logged in through the site and
the app seperately.