visit helper should update router url before handling it

Router URL should be set before handling it, otherwise if a redirect happens during handling, the router URL will end up with the wrong URL.