Fixed an issue with Client.js

Errors are now reported less confusingly, and clients can properly
connect with each other.