Small refactorization in user registration process.