added nil for logged_in