You could hide the button or link by checking to see if $_SERVER['REMOTE_USER'] has been set:
In the dokuwiki template in the file tpl_header.php:
<?php
tpl_action('recent', 1, 'li');
if(isset($_SERVER['REMOTE_USER'])) {
tpl_action('media', 1, 'li');
}
tpl_action('index', 1, 'li');
?>