code: function loginToHub (hubhost, hubport) {
    debug('perform hub login')
  
    hubport = hubport || 5222
  
    return getIdentity(hubhost, hubport)
      .then(function (identity) {
        return loginWithIdentity(identity, hubhost, hubport)
      })
  }
docs: Function: loginToHub
  Uses a userAuthToken to login to a Harmony hub.
  
  Parameters:
  (String) userAuthToken - A authentication token, retrieved from logitechs
  web service.
  (String) hubhost - Hostname/IP of the Harmony hub to connect.
  (int) hubport - Optional. Port of the Harmony hub to connect. By default,
  this is set to 5222.
  
  Returns:
  (Q.promise) - The final resolved promise will pass a fully authenticated
  XMPP client which can be used to communicate with the
  Harmony hub.