       params = $.deparam(location.search.split('?')[1])
       @apiKey ||= params.api_key
 
+  # ROUTES
+
   index: ->
     console.log "loading index route"
     @cleanupViews()
-    @addApiKeyParam()
+    @addApiKeyParam("sensors")
 
     sensors = new Workbench.Collections.SensorsCollection
       source: Workbench.source

  show: (id) ->
    console.log "loading show route", id
    @cleanupViews()

    if id is "demo"
      # Demo user

      @navigate "sensors/#{sensor.id}", { trigger: true }

  # Ensure the API Key is displayed in the URL params.
  addApiKeyParam: (base) ->
    if (location.search.length < 1)
      @navigate "#{base}?api_key=#{@apiKey}", { replace: true }

  cleanupViews: ->
    if @indexView
