detect if user is about to leave