Add support for event in registration

This PR brings support for event in the registration process.

When we have login and logout features, maybe it'll be better to rename this to "UserEvent", and having various event (USER_LOGGED, USER_LOGGED_OUT, USER_REGISTERED...).