public ActionResult ChangePassword(ChangePasswordModel model)
        {
            if (ModelState.IsValid) {
                String email = User.Identity.Name;
                DBAccessor dba = new DBAccessor();
                LogonResponse result = dba.CheckLoginCredentials(email, model.OldPassword);

                if (result.success == (int)LogonResults.SUCCESS) {
                    if (dba.UpdateUserPassword(email, model.NewPassword)) {
                        return RedirectToAction("ChangePasswordSuccess");
                    }
                    else {
                        ModelState.AddModelError("", "Password update failed, try again.");
                    }
                }
                else {
                    ModelState.AddModelError("", result.errorMessage);
                }
            }
            return View(model);
        }