  }

        log(`Connecting to ${serverUrl} with options: ${JSON.stringify(options)}`, 'info');

        // Create and connect client
        client = new DeviousBatonClient(serverUrl, options);

        // Set up callbacks
        client.onConnected = () => {
          log('Connected to server', 'success');
          connectButton.disabled = true;
          disconnectButton.disabled = false;
        };

        client.onBatonReceived = (value, streamType) => {
          log(`Received baton ${value} on ${s