using the right condition for redirect without session