Modern XMPP in the browser, with a JSON API