Forum Moderators: coopster
We have a very nice thread on Authentication [webmasterworld.com] that discusses the topic in detail. I suggest that you take a look there to learn the basics. If you have any trouble on the way, feel free to ask them right here. :)
Good luck!
There are lots of pre written scripts around all of which are a bit too big and drawn out for my liking if all you want is a simple easy to implement login system spend an hour or two reading up on session variables.