Properly wait for loggedOut Event when Quitting