Base64-encode the `then` parameter during auth

This ensures that the path + querystring survey transport intact across
the authentication flow.