Added validation to the register page