 app.listen webPort
 console.log '[WEBSERVER] running', "http://localhost:#{webPort} pid:#{process.pid}"
 
+# start user tracking
+usertracker.start()
+
+
 # NOTE: in the event of errors, send 500 to the client rather
 #       than the stack trace.
 app.use (err, req, res, next) ->

helmet     = require 'helmet'
request    = require 'request'
bodyParser = require 'body-parser'

{JSession} = koding.models
app        = express()


    res.cookie "clientIPAddress", remoteIp, { maxAge: 900000, httpOnly: no }

    usertracker.track result?.session?.username

    JSession.updateClientIP result.session.clientId, remoteIp, (err)->
      console.log err  if err?
      next()
