move deactivate event registration to the user-triggered action