Small refactor.
Fix problem with registration new users.