Adapted the login redirect logic from the old account console. Fixes #31469 Signed-off-by: Thomas Darimont <thomas.darimont@googlemail.com>