Finishing the login and logout features