Added handling of activation failure
Improved tests and registration error handling