refine the flow of redirect activity