             return message
 
 
-    _apiCall: (method, params, callback) ->
-        post_data = JSON.stringify(params)
+    _apiCall: (method, path, params, callback) ->
+        post_data = ''
+        post_data = JSON.stringify(params) if params?
         options =
             hostname: @host
-            method: 'POST'
-            path: '/api/v1' + method
+            method: method
+            path: '/api/v1' + path
             headers:
                 'Content-Type': 'application/json'
                 'Content-Length': post_data.length
+        options.headers['Authorization'] = 'BEARER '+@token if @token
+
         req = https.request(options)
 
         req.on 'response', (res) =>

                # 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
                @connect()
        else
            @emit 'error', data
            @authenticated = false
            @reconnect()

    connect: ->
        @logger.info 'Connecting...'
        options =
            headers: {authorization: "BEARER " + @token}

        @logger.info 'Opening WebSocket: ' + JSON.stringify(options)
        # Set up websocket connection to server
        @ws = new WebSocket @socketUrl, options



    login: ->
        @logger.info 'Logging in...'
        @_apiCall 'POST', '/users/login', {name: @group, email: @email, password: @password}, @_onLogin

    _onLogin: (data, headers) =>
        if data
