fix while statement compliation;
finish session support for xmpp and example.