websockets: add support for user specified onmessage
Better connection / password error handling
Fix jshint errors
Merge pull request #141 from cormier/fix-jshint

Fix jshint errors