Use event for login/logout