 
 generateFakeClient = (options, callback) ->
 
-  {clientId, groupName, section} = options
+  { clientId, groupName, section } = options
 
   fakeClient    =
     context       :


  res.cookie 'clientId', clientId, { maxAge, secure }

generateFakeClientFromReq = (req, res, callback)->

  {clientId} = req.cookies
  {section} = req.params

  # TODO change this with Team product
  groupName = 'koding'

  if not clientId and req.pendingCookies?.clientId
    clientId = req.pendingCookies.clientId

  generateFakeClient { clientId, groupName, section }, (err, fakeClient, session) ->

    return callback err  if err

    { delegate } = fakeClient.connection

    updateCookie req, res, session

