Add HW7 - login and logout function