//
        //  см. также Global.Application_AuthenticateRequest
        //
        public static NitroBolt.Wui.HtmlResult<HElement> HView(object _state, JsonData[] jsons, HttpRequestMessage request)
        {
            Action<HttpResponseMessage> cookieSetter = null;
            var logins = new Dictionary<string, string>(StringComparer.InvariantCultureIgnoreCase) { { "Demo", "demodemo" }, { "Test", "test" } };

            foreach (var json in jsons.OrEmpty())
            {

                switch (json.JPath("data", "command")?.ToString())
                {
                    case "login":
                        {
                            var login = json.JPath("data", "login")?.ToString();
                            var password = json.JPath("data", "password")?.ToString();
                            if (logins.Find(login) == password)
                                cookieSetter = request.SetUserAndGetCookieSetter(login);
                            else
                            {
                                //display error
                            }
                        }
                        break;
                    case "logout":
                        cookieSetter = request.SetUserAndGetCookieSetter(null);
                        break;
                    default:
                        break;
                }

                if (request.UserName() != null)
                {
                    switch (json.JPath("data", "command")?.ToString())
                    {
                        default:
                            break;
                    }

                }
            }
            var account = request.UserName();


            var page = Page(logins, account, request);
            return new HtmlResult
            {
                Html = page,
                State = null,
                ResponseProcessor = cookieSetter,
            };
        }