add hand on login and logout.