adding events on login and logout