Added logging of error messages to the password verification part.