                 @authenticated = true
                 # Continue happy flow here
                 @token = headers.token
+                @socketUrl = 'wss://' + @host + (if @options.wssPort? then ':'+ @options.wssPort else ':443') + '/api/v1/websocket'
                 @logger.info 'Websocket URL: ' + @socketUrl
                 @self = new User @, data
                 @emit 'loggedIn', @self

WebSocket   = require 'ws'
Log            = require 'log'
{EventEmitter} = require 'events'

User = require './user.coffee'


        @channels = {}
        @users = {}


        @ws = null
        @_messageID = 0
