public ActionResult Index(string Email, string Password, string returnUrl)
        {
            ViewBag.Message        = "";
            ViewBag.SuccessMessage = "";
            var user = db.CheckLogin(Email, Password, returnUrl);

            if (user == null)
            {
                ViewBag.Message = "Username or Password is incorrect.";
                return(View());
            }
            else
            {
                Session["UserId"]   = user.UserId;
                Session["FullName"] = user.FullName;
                //Session["UserType"] = user.UserType;

                //if (Convert.ToString(Session["UserType"]) == "Admin" || Convert.ToString(Session["UserType"]) == "Reception")
                //{
                //    return RedirectToAction("Index", "Candidate");
                //}
                //if (Convert.ToString(Session["UserType"]) == "Lab")
                //{
                //    return RedirectToAction("Index", "LabEntry");
                //}
                return(RedirectToAction("Index", "Home"));
            }
        }
 public override bool ValidateUser(string username, string password)
 {
     return(userrepo.CheckLogin(username, password, "") != null?true:false);
 }