Login and logout functionality completed