The Eagle book is a good starting point (and a good book in general). I would also look at the Apache::* modules on CPAN which may do at least part of what you want. Things that come to mind are Apache::Session, Apache::Cookie, Apache::Auth*, and even HTML::Mason. Look at what is on
http://search.cpan.org/search?mode=module&query=Apache and see what may already be of use to you.
Cheers,
KM