Well, that all depends on the kind of authentication you're doing. Do you have a backend database with the account information? Is that what you use for the logins? If so, then you're halfway there.
The second part is to make sure the user is logged in. In PHP cases, you use sessions. There's too much about to explain here, but any good PHP manual will explain how sessions work (they can use cookies or not). In a job I'm working, when the user logs in, I have a session open and a flag is set saying that the user who owns that session is logged in.
Then, in the script for each page, run a check to see if there's a user session and if the user is logged in (is the flag set?). If the flag isn't set or the user doesn't have a session, you can immediately redirect them to the login page.
==============
Link Building|
Link Building Services