fix password validation and error messages