Prevent NPE on local devserver when not logged in

@EnlightenedCode Here's the fix to prevent NPE when testing locally having never logged in.