How to: Add a LoginStatus Button to an ASP.NET Web Page
To allow users to log in to an ASP.NET application that uses ASP.NET membership (forms authentication) for user authentication, you can use the LoginStatus control. The LoginStatus control detects a user's authentication status. If a user is not authenticated, the control displays a button that directs the user to the application's login page. If the user is authenticated, the LoginStatus control displays a button that users can click to log out of the application.
By default, ASP.NET membership and forms authentication is configured to work with a page named Login.aspx. You can change the default login page name in the application's configuration file by setting the loginUrl attribute of the <forms> element.
By default, the LoginStatus control renders a button. You can configure the button text by setting the LoginText property. Alternatively, you can configure the LoginStatus control to display an image (an ImageButton control).