Fix redirect behaviour after sign in.