added necessary code to prevent back button hack