redirect after login to "next" login param

After login, in thanks page, redirect user to "next" get param that was sent to login
thanks. changes added, they should be still in the pull request.