WL-900 Make the access tool pass through parameters on login

Currently when you try to use access content without a login, all params
in the query string get dropped. It looks like this was fixed for the
portal tool but the behaviour persists in access.

I have moved the logic for constructing the URL to return to to its own
method to tidy things up a bit.