 
   getUserArea:-> KD.getSingleton('groupsController').getUserArea()
 
-  getSessionToken:-> $.cookie('clientId')
+  getSessionToken: getSessionToken
 
   # createRoutingKey:(service, event)->
     # "client.#{Bongo.createId()}.#{KD.whoami().profile.nickname}.#{service}.#{event}"


  mq: do->
    { broker:{ servicesEndpoint }, authExchange } = KD.config
    options = { servicesEndpoint, authExchange, autoReconnect: yes }
    broker = new KDBroker.Broker null, options
getSessionToken=-> $.cookie('clientId')

KD.remote = new Bongo

  precompileApi: KD.config.precompiledApi ? no
