Added basic error checking on login
Dont allow non-logged in users