refine portal redirect