update login and logout