Fix detection of 'logged-in-ness'.