Detect and store terminated registrations

Closes #7.