working for logged in