public ActionResult IniciarSesion(LoginModel model)
        {
            var usuario = Contextt.Usuarios.SingleOrDefault(p => (p.Login == model.UserName || p.Email == model.UserName) && p.Password == model.Password);

            if (usuario != null)
            {
                FormsAuthentication.SetAuthCookie(usuario.Login, true);
            }
            else
            {
                return Redirect("/Seguridad/IniciarSesion");
            }

            return Redirect("/Home/Index");
        }
        public ActionResult Login(LoginModel model, string returnUrl)
        {
            if (ModelState.IsValid && WebSecurity.Login(model.UserName, model.Password, persistCookie: model.RememberMe))
            {
                return RedirectToLocal(returnUrl);
            }

            // If we got this far, something failed, redisplay form
            ModelState.AddModelError("", "The user name or password provided is incorrect.");
            return View(model);
        }