Added password validation to register.