if (redirectUri == null || redirectUri.isEmpty()) {
redirectUri = "." + AppConfig.PATH_PATIENT_ROOT + "/" + hrid + "/account";
}
}
if (user.testPassword(currentPassword) == false) {
throw new Exception("Incorrect password");
} else if (user.getUsername().equalsIgnoreCase(newPassword)) {
//error if setting password with username
throw new Exception("Password matches username");
}