} else {
connection.login(user, password);
}
} else {
LOG.info("Logging in anonymously to XMPP on connection: " + connection);
connection.loginAnonymously();
}
// now lets send a presence
connection.sendPacket(new Presence(Presence.Type.AVAILABLE));
}