JSJaC inherit
When integrating a web chat (like JWChat) into your existing community most likely you don’t want to have your users sign in a second time just for the chat. A possible solution to this problem domain is to let your web server handle BOSH session instantiation and xmpp authentication. Once successfull you can pass the credentials (i.e. the runtime data) of this BOSH session to JSJaC. There’s an undocumented method call ‘inherit’ which handles this.
Here’s a fine tutorial on how to do this: Chat Hacking, Part II