Added basic user registration and validation.