Is there a way to prevent a user from doing back and forward (e.g. a user logs on and then walks away from the
machine). Someone else walks up and uses the back and
forward buttons to look at what the user had seen.

You can achieve your objective in another way.
Create a window without the toolbar(javascript).So back and forward buttons will not be available.
Even after doing this one can go back by right clicking the page and choosing the back option in the popup menu.
To avoid this you have to write code in javascript so that the right click is captured and the click event is thrown away without any action.

TechTarget provides technology professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective purchase decisions and managing their organizations technology projects - with its network of technology-specific websites, events and online magazines.