Finally figured out how to get the username from within the .ejs file. Phew. Now everything else should be easy.