OK, on the log in link that you have on the check out page try adding this to the link:
?accesscheck=checkout.php
so you should have something like this:
users_login.php?accesscheck=checkout.php
after the user logs in, they should be redirected back to the check out page.