public ActionResult Index(BiscuitChief.Models.Login login, string ReturnUrl = "")
        {
            if (ModelState.IsValid)
            {

                bool isvalidlogin = Models.Login.ValidateLogin(login.UserName, login.Password);

                if (isvalidlogin)
                {
                    FormsAuthenticationTicket authTicket = new FormsAuthenticationTicket(1, login.UserName, DateTime.Now, DateTime.Now.AddMinutes(30), true, "");
                    String cookiecontents = FormsAuthentication.Encrypt(authTicket);
                    HttpCookie cookie = new HttpCookie(FormsAuthentication.FormsCookieName, cookiecontents) { Expires = authTicket.Expiration, Path = FormsAuthentication.FormsCookiePath };
                    Response.Cookies.Add(cookie);

                    if (!String.IsNullOrEmpty(ReturnUrl))
                    { return Redirect(ReturnUrl); }
                    else
                    { return Redirect("/"); }
                }
                else
                {
                    FormsAuthentication.SignOut();
                    Session.Clear();
                }
            }

            return View(login);
        }
        public ActionResult Index(BiscuitChief.Models.Login login, string ReturnUrl = "")
        {
            string resultmsg = string.Empty;

            if (User.IsInRole("ADMIN"))
            { resultmsg = login.AddNewUser(); }
            else
            { resultmsg = "Success"; }

            ViewBag.ResultMessage = resultmsg;
            return View(login);
        }