Adds an event for logout