<script type="text/javascript">
function preventBack() { window.history.forward(); }
setTimeout("preventBack()", 0);
window.onunload = function () { null; };
</script>
Use this on the Login page to prevent the history forward. And on the Hime page place the below snippet:
<script type="text/javascript" language="javascript">
function DisableBackButton() {
window.history.forward();
}
DisableBackButton();
window.onload = DisableBackButton;
window.onpageshow = function (evt) { if (evt.persisted) DisableBackButton(); }
window.onunload = function () { void (0); };
</script>
Hope this helps.
Thank you :)