Added very small change to correctly check for logged in status