refs #396 - better handling of spaces and & in URL when redirecting from
login