Hey, I made a post about one of my plugins that I wrote to do this very task! Sorry, I didn't see this post, otherwise I'd have added it here.

http://punbb.org/forums/viewtopic.php?id=15151

Hope it helps, lemme know if you need help with that, depending on how you want to structure your project, theres multiple ways to handle auto-logins for punBB. The plugin uses the simplest AJAX one!

I've been FORCED to use IPB from Invision for several large content projects this last year. I can't tell you how happy I was to find out about PunBB in the last few weeks! Its tiny, fast, and works great along side Ruby on Rails. I posted up a Ruby on Rails plugin that provides wrapper models for all the PunBB data tables, as well as a login/logout generator that auto-logs you into the forums. 

Grab it at svn://ahgsoftware.com/punbb_sdk/trunk

I hope this helps someone out, thanks for the great software guys!