added login and log out