Detect node deletion and exit.

* Use OpenCenterEndpoint.whoami()
* Restructure registration.