Note: the following only works if the page is on the same domain (including HTTP vs HTTPS) as the login page. This does not work if the page is HTTP and the login page is HTTPS and vice versa.
To display the member's name in any HTML, use the following HTML tag wherever you want the name to appear:
Then add the following script once at the bottom of the page (if you are using those tags only on specific pages) or in the site footer (if you want to use this tag throughout the site):