     @listenTo Workbench.Events, "redirectToSensor", (sensor) =>
       @navigate "sensors/#{sensor.id}", { trigger: true }
 
+  # Ensure the API Key is displayed in the URL params.
+  addApiKeyParam: ->
+    if (location.search.length < 1)
+      @navigate "sensors?api_key=#{@apiKey}", { replace: true }
+
   cleanupViews: ->
     if @indexView
       @indexView.remove()

  index: ->
    console.log "loading index route"
    @cleanupViews()

    if (location.search.length < 1)
      @navigate "sensors?api_key=#{@apiKey}", { replace: true }

    sensors = new Workbench.Collections.SensorsCollection
      source: Workbench.source

      @showView.remove()
      delete @showView

  # Check params for API Key. Use the demo user's key if none is specified.
  getApiKey: ->
    if (location.search.length < 1)
      # Demo user read-only key
