AJAX IM + WordPress (2 posts)

I would really like to integrate AJAX IM (http://ajaxim.com) into my existing WordPress installation. However, I have no idea where to start so that AJAX IM can use the existing WordPress database for its users. (i.e. when you are logged in to WP, the chat is active with your username)

OR if anyone might know of a better solution to achieve a 'Facebook-like' chat system that is easily integrated with WP, that would be perfectly acceptable.