Added validation for registration form