added support for rooms - fixes #1, simplified client js