docs: function loginWithIdentity (identity, hubhost, hubport) {
    debug('create xmpp client using retrieved identity token: ' + identity)
  
    var deferred = Q.defer()
    var jid = identity + '@connect.logitech.com/gatorade'
    var password = identity
    var xmppClient = new Client({
      jid: jid,
      password: password,
      host: hubhost,
      port: hubport,
      disallowTLS: true
    })
  
    xmppClient.on('error', function (e) {
      debug('XMPP login error', e)
      xmppClient.end()
      deferred.reject(e)
    })
  
    xmppClient.once('online', function () {
      debug('XMPP client connected using identity token')
      deferred.resolve(xmppClient)
    })
  
    return deferred.promise
  }