adding login and logout