public override async Task ReceiveAsync(WebSocket socket, WebSocketReceiveResult result, byte[] buffer)
        {
            var socketId = ConnectionManager.GetId(socket);
            var message  = _encoding.GetString(buffer, 0, result.Count);

            //_accountService = serviceScopeFactory.CreateScope().ServiceProvider.GetService<AccountService>();
            if (ConnectionManager.Authorized(socketId))
            {
                var name        = ConnectionManager.GetName(socketId);
                var messageView = $"{name}: {message}";

                await SendMessageToAllAsync(messageView);

                _logger.LogInformation("New message");
            }
            else
            {
                //try login
                LoginModel model = TryParseJson <LoginModel>(message);

                if (model != null)
                {
                    var login = _accountService.CheckPassword(model);

                    if (login.Succeeded)
                    {
                        ConnectionManager.AddMapping(socketId, login.Name);

                        await SendMessageAsync(socketId, "Success");
                    }
                    else
                    {
                        await SendMessageAsync(socketId, "Error login");
                    }
                }
            }
        }