 
         client = HttpClient.create('http://d.web2.qq.com')
             .path('channel/poll2')
-            .header('Cookie', @cookie)
+            .header('Cookie', @cookie())
             .header('Content-Type', 'application/x-www-form-urlencoded; charset=UTF-8')
             .post(QueryString.stringify(params))((err, resp, body) =>
                 console.log 'poll return', body
                 @emit 'poll', err, body
-        )
+                #todo retcode 102 redo online
+        )
+
+    logout: ->
+        @stop()
+        params =
+            clientid: @authInfo.clientid
+            psessionid: @authInfo.psessionid
+            ids:''
+            t: new Date().getTime()
+
+        client = HttpClient.create('http://d.web2.qq.com')
+            .path('channel/logout2')
+            .header('Cookie', @cookie())
+            .post(QueryString.stringify(params))((err, resp, body) =>
+                console.log 'poll return', body
+                @emit 'poll', err, body
+        )
+
     stop: ->
         @emit 'stop'
 

        uin = msg.to.uin
        if not uin
            console.log 'uin miss'
            uin = accountToUin msg.to.id
            if not uin
                console.log 'no uin'
                return

            #     console.log 'groupMember',data
            # )

            msg = Message.create('hi', {uin:})
            @sendToFriend(msg, (data)->
                console.log 'send msg', data
            )
            msg = Message.create('hiqun', {uin:})
            @sendToGroup(msg, (data)->
                console.log 'send group msg', data
            )
            msg = Message.create('hiqun', {uin:})
            @sendToDiscussionGroup(msg, (data)->
                console.log 'send discus group msg', data
            )

        @online()

