Redirect the user back from AD form once done

Redirect the user back to the URL (s)he came from once they fill in the
AD form.

After completing the request, take the user back to the page they
originated from and flash the message. But if the user came back from
the feedback form message, still return them back but don't flash the
message.
Instead you can use:

redirect_to_with_protocol destination, notice: msg

We already dried up that protocol logic. redirect_to_with_protocol() is defined in ApplicationController