Here is an example URL: https://www.example.com/checkout/order-pay/100/?pay_for_order=true&key=order_x82jhsx71
Then after switching the user the URL changes to: https://www.example.com/checkout/order-pay/100/?pay_for_order=true&user_switched=true
This breaks the location each time returning a 404 because the &key=order_x82jhsx71 is missing. I've looked at the code for quite some time and can't find out what is causing this.
Any help would be appreciated :)