You can use a login page, where the suppied username and password are checked off against a database and, if there's a match, set a session variable that says they're allowed to look at locked pages - sort of like being issued a backstage pass.
Each locked page first retrieves the session variable and checks that it's valid. If yes, the page continues to be processed, otherwise they're redirected back to the login page and the script exits.
That's just an outline, of course.