Added validation to registration form