fix redirect for logged in users