Fixes #5028: includes current url and forward url in ajax json

This allows, for example, ajax form submission and then forwarding to the correct page once the submission completes. A failed submit, for whatever reason, doesn't force the user to leave the page.