There are few options, You can redirect user to some other page for example Logout.aspx and sign out the user on page load of that page. check
This Answer for more information[
^]
Another option is you can use Linkbutton instead or anchor tag
<asp:LinkButton runat="server" Text="Log Out" OnClick="LogOut_Click" ></asp:LinkButton>
you can do the sign out in code behind method called
LogOut_Click