Fixed some visible bugs and connection problems in the xmpp client