I have the same problem. Everything works fine, but when someone entered a wrong code, the script jumps to login.php, without any error message.. For test I have overwrite my files "checkout_confirmation.php", "checkout_payment.php" and "checkout_process.php" with the files in the contribution, but the error is still there... And I think I know where the error is. My Shop works with session-ids in the url. And that session-id changes when someone is on the checkout_payment.php and entered a wrong code when it jumps to login.php... And idea how to fix that?
All the best