I'm trying to build a password protected area on my site. I can password protect the individual php files no problem, but I have multiple swf, pdf & zip files as well and I need to make sure that these can only be accessed once the user has logged in.

I can get this all to work no problem if I use .htaccess

The issue I have is that I need to be able to let the user logout (using a button) as this will be used on public computer within a school, something that can't be done with .htaccess

If anyone can help me out, or point me in the direction of a free or commercial script I'd really appreciate it as I'm pulling my hair out with this