added validation for password and confirm password, as well as validation for minimum password length of 8 characters