How to redirect users to log in page when they try to access the order page, but not when they try to check out
That's one of the main features of the LoginToboggan module. 



When the Present login form on access denied (403) is enabled in its setting form, any access denied page will display a login page. Upon login, users are redirected back to the previously requested path.