fix login successful redirect error issue