public ActionResult Login(UserViewModel loginVM) { ActionResult oResponse = null; IUserBO returnUserBO = new UserBO(); if ((returnUserBO = _userBLL.CheckUserLogin(loginVM.User.Email, loginVM.UserCred.UserPassword)) != null) { IUserPO _iUserPO = new UserPO(); _iUserPO = Mapper.Map <IUserBO, IUserPO>(returnUserBO); FormsAuthentication.SetAuthCookie(_iUserPO.Email, false); Session["UserModel"] = _iUserPO; //Refresh Menus Session["MenuItems"] = HomeController.GetMenuItem(HttpContext.Session); oResponse = RedirectToAction("Dashboards", "Home"); } else { oResponse = RedirectToAction("Shared", "Error"); } return(oResponse); }