     else
       @nextQuestion()
 
-
-
-App.Config.set( 'layout_ref/customer_chat', App.CustomerChatRef, 'Routes' )
-
-App.Config.set( 'Chat', { prio: 300, parent: '', name: 'Customer Chat', target: '#layout_ref/customer_chat', switch: true, counter: true, role: ['Agent'], class: 'chat' }, 'NavBar' )
-# App.Config.set( 'Chat', { controller: 'CustomerChatRef', authentication: true }, 'permanentTask' )
+class CustomerChatRouter extends App.ControllerPermanent
+  constructor: (params) ->
+    super
+
+    # check authentication
+    return if !@authenticate()
+
+    App.TaskManager.execute(
+      key:        'CustomerChatRef'
+      controller: 'CustomerChatRef'
+      params:     {}
+      show:       true
+      persistent: true
+    )
+
+App.Config.set( 'layout_ref/customer_chat', CustomerChatRouter, 'Routes' )
+App.Config.set( 'CustomerChatRef', { controller: 'CustomerChatRef', authentication: true }, 'permanentTask' )
+App.Config.set( 'CustomerChatRef', { prio: 1200, parent: '', name: 'Customer Chat', target: '#layout_ref/customer_chat', switch: true, counter: true, role: ['Agent'], class: 'chat' }, 'NavBar' )
 
 
 class chatWindowRef extends Spine.Controller


    # @testChat @chatWindows[0], 100
    @initQuiz()

  testChat: (chat, count) ->
    for i in [0..count]

App.Config.set( 'layout_ref/primary_email', PrimaryEmailRef, 'Routes' )


class App.CustomerChatRef extends App.Controller
  @extend Spine.Events

  questions: [
