Login system dealing with many pages

I have a content management system containing many pages. How do you make a login page that will protect all those pages? How do you protect many pages?

any tutorials would be great or any examples.

thanks