Instead of deleting the line you could use something like
if (isset($_SERVER['REMOTE_USER'])) {
tpl_action('login', 1, 'li', 0, '<span>', '</span>');
// ... additional buttons here
}
which checks if the user is logged in. You could also put something like
<?php if (isset($_SERVER['REMOTE_USER'])) : ?>
before and
<?php endif; ?>
after the HTML block that surrounds the links.