public ActionResult GenerarCookie()
        {
            string username = Request["username"];
            string password = funcion.md5_encode(Request["password"]);
            string output   = funcion.base64_encode(username + ":" + password);

            return(Json(new { success = true, message = output }));
        }
        public ActionResult IngresoUsuario()
        {
            bool   status = false;
            string msg    = "";

            string username_login   = Request["username"];
            string password_encoded = funcion.md5_encode(Request["password"]);

            if (conexion_now.ingreso_usuario(username_login, password_encoded))
            {
                var userCookie = new HttpCookie("uid", funcion.base64_encode(username_login + ':' + password_encoded));
                userCookie.Expires.AddDays(365);
                HttpContext.Response.Cookies.Add(userCookie);
                status = true;
                msg    = "1";
            }
            else
            {
                status = false;
                msg    = "0";
            }
            return(Json(new { success = status, message = msg }));
        }