Export same-origin check and `end_of_redirect_response` template.

Export some properties to allow developers to override them to
support logging in using the OAuth redirect flow from cross origin
domain.