add xmpp to server required oauth2 scope
add error handler to $.ajax for response other than 200