Fix bug in popup loading script

Shouldn't load for logged-out users!

Change-Id: I72b419f06319d6b4a1e89647515ef1311ca48521