Fix #347
this -> self (so javascript. many this. wOw)
Updated register token

Fixes #353
Fixes #341
Fixes: "AttributeError: 'ReaderThread' object has no attribute 'sendPong'"
Merge pull request #352 from waalt/js-fix

this -> self (so javascript. many this. wOw)
Merge pull request #348 from waalt/master

Fix #347