Improve error handling and handle joining rooms both by name or id

(Re-releasing on npmjs.org would be sweet too; the currently shipped build is old.)