change password callback to support multiple password encodings