How to remove return url in asp.net membership
<p>I am using asp.net membership and I got some code from code plex
on loin page that is common to all role members I am doing following code:</p>

<pre><code>protected void Login1_Authenticate(object sender, AuthenticateEventArgs e)
{
//some code missing
below is to identify role and then redirecting to appropriate default page
else
        {
            // Next, determine if the user's username/password are valid
            if (Membership.ValidateUser(loginUsername, loginPassword))
            {
                e.Authenticated = true;
                string[] userRoles = Roles.GetRolesForUser(loginUsername);

                switch (userRoles[0])
                {
                    case "Administrator":
                        Login1.DestinationPageUrl = "~/Admin/Default.aspx";
                        break;
                    case "Member":
                        Login1.DestinationPageUrl = "~/Members/Default.aspx";
                        break;

                }
            }
}
</code></pre>

<p>But when I log out, it logs out properly, redirecting me to the log out page but attached a return url:</p>

<pre><code>http://localhost:52045/NexLev/login.aspx?ReturnUrl=%2fNexLev%2fMembers%2fDefault.aspx
</code></pre>

<p>So if first time a member log ins then it takes to correct page then if it log out then the above url apear on log out page, but next time if an admin logs in then it take to the LoginView logged in template kept on the same log in page instead of taking it to the default page of admin.</p>

<p>Could some body suggest how to overcome with this problem? Or should I apply a different approach to redirect according to user roles.</p>
