This screen cast (http://channel9.msdn.com/Showpost.aspx?postid=314283) shows you how to get the build in functionality in the Authentication Provider in .net 2.0 to work. This will let you build a webpage that requires login from the users without writing a single line of code.

Why is this interesting for SharePoint? Because if you want to use FormsAuthentication in SharePoint this is the components you want to use!