adding functionality to the login method
login and logout methods complete