<note 2006-10-13>

This post was written for ASP.NET 1.*.  There were some changes in ASP.NET 2.0 which make this information unnecessary.  If you're using ASP.NET 2.0, skip this post.

</note> 

This question comes up several times a week on the asp.net forums, so I'm answering it here as a cut and paste answer.  Click on the methd names below to be taken to the MSDN documentation for them.

The first thing to note is that when you are testing your forms application, don't directly access localhost/webname/login.aspx.  You want to try and access some other page in your application, so that you can make sure the authentication handler will catch your request and redirect you to the login page.  After you have authenticated, you should be directed to the original page you requested.  If you accesses your login page directly, .NET is smart enough to send you to default.aspx.  Likewise, if you don't specify a page at all, it is assumed you wanted default.aspx.
After validating a user's security credentials, the basic way to create an authentication ticket is to call RedirectFromLoginPage().  This method creates the authentication ticket and redirects the user to the page they originally requested.  However, if you want to direct the user to another page, you can instead use the SetAuthCookie() method.  This will create the authentication ticket, but will not issue a redirect.   You must then handle the redirect using Response.Redirect.
For more information on Forms Authentication, I have been compiling a list of useful resources at this link: