why not keep the actual files outside of the web root, then create a passthrough file in php.
The passthrough file can then force the person to log in.
Once they are logged in it will go grab any file they want, you can also do directory browsing with php's filesystem functions and a bit of recursion.
Basically write your own directory browser in php, and make that browser force the log in.