Modified hashPassword and matchPassword to check for empty strings.