write the code to authenticate the user and save it to a file.
then on each page include the line
require("filename.php);
this forces the php engine to include that file and run the script
note that you will need to turn each html page into a php page to force the script to execute...