public ActionResult UserLogin(UserLoginPageReq userCreds) { try { bool truthval; OperationsOnDatabase odb = new OperationsOnDatabase(); PasswordEncryption pe = new PasswordEncryption(); truthval = pe.AuthenticateUser(userCreds.name, userCreds.password); if (truthval == true) { TempData["userdata"] = userCreds; return(RedirectToAction("ShowAppsToUsers")); } return(RedirectToAction("ErrorLogin")); } catch (Exception e) { log.Error("UserLogin class in project controller" + e.Message); return(RedirectToAction("ErrorLogin")); } }