-Make sure that events are not created if the user is not logged in
-Added a disconnection event