Encode URI params in state param for OAuth2

- Takes all query params for the log in page authentication request and
  URI encodes them as the data for the OAuth2 state param
- On OAuth2 provider response, unpacks the returned state param as a URI
  encoded query string onto the original URI, and performs a redirect