Added handling of XMPP mode and logged in status