Changed username to email on login/registration. Added logout method