adjusted xmpp connection handling to new structure