Ensuring that the redirect url is used in Login page

If the user is logged out when on an internal page, login page has a
redirect parameter - this was ignored earlier and login always redirected
to dashboard on successful login.

This is now fixed to use the redirect parameter whenever it is present.