i think the first part of what you asked is already implemented in the tutorial, the second part is simply a matter of surrounding the element you wish to only appear if logged in with some php code:
Code:
<?php
if($_SESSION["s_username"]){
?>
<p>This will only appear if you are logged in!</p>
<?php } ?>