Fixing the login and out model