/*
* We track session state changes. We can only send messages when the
* state == loggedIn.
*/
session.onStateChanged(new Listener<Session.State>() {
public void onEvent(final State state) {
if (state == Session.State.loggedIn) {
GWT.log("We are now online", null);
sendHelloWorldMessage(session);
} else if (state == Session.State.disconnected) {