Login mechanisms check for logged in user

The login mechanisms will now check if there is a logged in user. Closes #22