User registration code

User registration code moved to events onUserBeforeSave(),
onBeforeStoreUser().