Login / Register - Redirect to same page (WooCommerce).

Hi

I'm using the [woocommerce_my_account] shortcode as a login / register form when user is not logged in and tries to pay for a custom created order. (/checkout/order-pay/12345?pay_for_order=true&key=order_examplekey1234)

https://gyazo.com/d7485c9de57fabacdf93c81753b59d32

// If checkout registration is disabled and not logged in, the user cannot checkout
if ( ! $checkout->enable_signup && ! $checkout->enable_guest_checkout && ! is_user_logged_in() ) {
	echo apply_filters( 'woocommerce_checkout_must_be_logged_in_message', __( 'You must be logged in to checkout.', 'woocommerce' ) );
	echo do_shortcode( '[woocommerce_my_account]' );
	echo "<br/>";
	return;
}

Currently it redirects the users to /account page after login on the /checkout/order-pay/ page. Any ideas on how to redirect the user to the current page (order) they were on when they logged in / registered?

Cheers.