Trying to get logged in flag to work

I'm not sure how to do this, I can't put php inside the javascript