If you drop the HTTP Basic auth switch to a completely PHP based.
There are several different free scripts available that work by simply including them into your site and setting up a few things.
If you want to roll your own there are a few different methods. But basically you can use cookies or sessions and have every page check for the presence of specific vars with the right values before displaying the page. If the values don't match what they should use header() to kick them back to the login page.