login and logout complete