dEvent = JSON.parse(e.data)
      if (cloudEvent.type === 'rig.connection.create') {
        payload = cloudEvent.data
        connectionToken = payload["connection_token"]
        createSubscription(connectionToken)
      } else if (cloudEvent.eventType === 'greeting') {
        addEvent(cloudEvent)
      } else if (cloudEvent.type === 'rig.subscriptions_set') {
        document.getElementById("submit-button").removeAttribute("disabled");
      }
    }
    source.onerror = (e) => console.log("error", e)

 