Refactored user registration component.