Log Out Page - Creating a Custom Membership Provider and Membership User utilizing a Data Set Table Adapter - Step 14
When the user clicks to Log Out, we'll call our own custom functions to kill the cookies, possibly make database changes, and return them to the Log In page.
The built-in Log Out functionality is overridden in this example so that we can have more control over our cookies and what events actually take place.