fixed retrieval of the redirect url when there is & in the redirected url