Simplified the test of logged in status