Fixing unregister method to allow single registration per webapp

This PR fixes Issue #4