Just to point out that there seems to be an inconsistency between what the javadocs say and what actually happens in XMPPConnection.login
The javadocs say:
Before logging in (i.e. authenticate) to the server the connection must be connected. For compatibility and easiness of use the connection will automatically connect to the server if not already connected.
While in reality the method throws an IllegalStateException if not connected.
Keep up the good work