To accomplish this i set the username as a session variable (mostly because i had it display on all pages at the top right so the user could verify it was them as well as change any settings for their account). I am not sure if this is what you would want to do, but seeing as you already have a session going it seems like the easiest approach.
I had a box when the user signs in for their username and literally just posted it to session username.
$_SESSION['username']=$_POST['username'];
As far as your line, echo "Welcome 'username'" is concerned, You arent actually telling it to echo the username you would have for that person, but rather just username itself.