Unless it's something construct-specific you probably have better luck asking on the newgrounds forum or their Discord. See bottom of the page here newgrounds.io/help
Setting a global variable should be relatively easy to do. I'd assume the newgrounds API probably returns it along with some other values. Probably a JSON object.
Your code should look something like this (I did not look at how this actually works, I'm mostly guessing here)
var newgrounds = [login call];
runtime.globalVars.yourvariable = newgrounds.username;