One way is to put a snippet tag in all your templates with this in the snippet code:
<?php
$isAuthenticated = $modx->user->hasSessionContext($modx->context->get('key'));
if (!$isAuthenticated) {
$modx->sendUnauthorizedPage();
}
That will forward everyone who is not logged in to the unauthorized page.
Then define an unauthorized page in System Settings and put the Login snippet on that page.
Adding &redirectToPrior=`1` to the login snippet tag will send the user to the page they were trying to reach after they log in.