Store it in a session variable and you can use it anywhere: p_web.SetSessionVariable('username',UserName).
In a header use 'Logged-in user: ' & p_web.GetSessionVariable('username') or create a routine and use <!-- Net:s:username --> on the xHtml tab.
Peter
Correction: it should read Set/GetSessionValue - not variable. Or shorthand ssv/gsv.
Peter