adding the login/logout functionalities