1)well what database do u usE>?
2)what are all the things you want to do with your login page?
3)what are all the things you want to do when the person is logged in?
i think your probally looking to build a accesscontrol.php!
a accesscontrol PHP basically protects anything from non logged on users! and all you have to do is included it in the web page
<?php include 'accesscontrol.php'; ?>
put the page has to be a PHP file