         cipher.update(
           ''+pubName+req.cookies.clientid+Date.now()+Math.random()
         )
-        privName = ['secret', 'kite', cipher.final('hex')+".#{username}"].join '-'
+        privName = ['secret', 'kite', "#{cipher.final('hex')}.#{username}"].join '-'
         privName += '.private'
 
         bindKiteQueue = (binding, callback) ->

    )

  app.get '/upload/test', (req, res)->
    res.send \
      """
      <script>

    res.end "#{state}"

getAlias =(url)->
  rooted = '/' is url.charAt 0
  console.log {url}
  url = url.slice 0  if rooted
  console.log {url}
  alias = "#{url.charAt(0).toUpperCase()}#{url.slice 0}"  if url in ['auth']
  if rooted then "/#{alias}" else alias

app.get '*', (req,res)->
  {url} = req
  queryIndex = url.indexOf '?'
  [urlOnly, query] =\
    if ~queryIndex then [url.slice(queryIndex), url.slice(0, queryIndex)]
    else [url, '']
  alias = getAlias urlOnly
  console.log 'alias', alias
  res.header 'Location', "/#!#{alias ? urlOnly}#{query}"
  res.send 302

