checking for logged in status