add login and logout