It depends on what you want to have happen here. First off, you're going to need a login script and a database.

There are great pieces of documentation for this found online. I can't point you...