You can share the authentication database by modifying the authentication plugins of your XMPP server or HTTP server (depending on which system is the master).
You could also use SASL ANONYMOUS authentication and pass in your session cookie. You could define your own authentication based on some kind of token (this is how Google Talk does it).
You can read about how we did this at Chesspark here:
http://metajack.im/2008/08/27/migrat...-gory-details/