adding login/out functionality