{source}

<?php 

    $user = JFactory::getUser();        // Get the user object
    $app  = JFactory::getApplication(); // Get the application
if ($user->id != 0)
{
    echo '<a href="https://www.mempad.co.uk/">Log in to MEMPAD</a>   |   Logged in as ' . $user->name . '-> <a href="https://www.sbu.org.uk/log-out">Log out</a>';
}
else 
{
    echo '<a href="https://www.mempad.co.uk/">Log in to MEMPAD</a>  |   <a href="https://www.sbu.org.uk/login">Login to Edit Website</a>';
}

?> 

{/source}