url-encode username passed to login-uri after failure

If the username contains \+ or other special characters, the encoding can get messed up.