clean up, rethinking logged in logic