);
                });
                return connection.start();
            })
            .then(function () {
                addLine('user ' + username + ' connected');
                setInterval(function () {
                    addLine('Refreshing token');
                    refreshToken(username, password);
                }, 20000);
                document.getElementById("broadcast").addEventListener("click", function (event) {
                    var message = document.getElementById(