public ActionResult Registro(Usuario model)
        {
            //TEMPORAL
            using (var db = new ConcesionarioEntities())
            {
                var clave = ConfigurationManager.AppSettings["ClaveCifrado"];

                model.email = SeguridadUtilidades.Cifrar(model.email, clave);

                model.password = SeguridadUtilidades.GetSha1(model.password);
                try
                {
                    db.Usuario.Add(model);
                    db.SaveChanges();
                    return RedirectToAction("Index", model);
                }
                catch (Exception e)
                {
                    return View(model);
                }
            }

            return View(model);
        }
        public override bool ValidateUser(string username, string password)
        {
            using (var db = new ConcesionarioEntities())
            {

                var p = SeguridadUtilidades.GetSha1(password);
                return db.Usuario.Any(o => o.password == p &&
                                        o.username == username);
            }
        }
        public override MembershipUser GetUser(string username, bool userIsOnline)
        {
            using (var db = new ConcesionarioEntities())
            {
                var user = db.Usuario.FirstOrDefault(o => o.username == username);
                if (user == null)
                    return null;

                return new UsuarioMembership(user);
            }
        }