You can use session.abandon()
or
formsauthentication.signout()
In both the cases back button will function but the session will not be active.
If you want to cancel the back button then use this code.
<script type="text/javascript">
window.history.forward();
function noBack() { window.history.forward(); }
</script>
<body onload="noBack();">
onpageshow="if (event.persisted) noBack();" onunload=""></body>