         @self = null
         @channels = {}
         @users = {}
-
+        @teams = {}
 
         @ws = null
         @_messageID = 0

                @emit 'loggedIn', @self
                # Load userlist
                @_apiCall 'GET', '/users/profiles', null, @_onProfiles

                @connect()
        else
            @emit 'error', data
            @authenticated = false
            @reconnect()
    
    _onProfiles: (data, headers) =>
        if data
            @users = data

pingInterval = 60000

User = require './user.coffee'
Message = require './message.coffee'

class Client extends EventEmitter
    constructor: (@host, @group, @email, @password, @options={wssPort: 443}) ->
