Fixed #20114 -- support custom project login_url in tests

Thanks to Matias Bordese for the patch