Hope this makes sense!
I feel, as you probably do, that guests shouldn't have access to those buttons. I'm going to post a request in the tracker that this feature simply not be displayed when generating the course page for guests. This is a simpler approach than attempting to reset the page after each guest access.
I've reported this in the Tracker as MDL-7767. I gave two options for solving the problem there. Please vote for the issue and add your own comments if required.
(Edited by Martin Dougiamas - original submission Saturday, 2 December 2006, 10:49 PM) to fix the tracker link