SIGN IN SIGN UP

Issue #14132, Issue #17214: Merge two redirect handling fixes from 3.5

M
Martin Panter committed
0b39a556e8aa4d15de21a3305f74e12886d5f31b