Safer logic for password verification, disabling the empty password and the empty hash.