[[!Login? &loginResourceId=`24`]]
if (!empty($response) && is_array($response)) {
$modx->log(modX::LOG_LEVEL_ERROR,"login - resource not empty & is array");
if (!empty($response['success']) && isset($response['object'])) {
if (!empty($loginResourceId) && ($url = $modx->makeUrl($loginResourceId, $loginContext, '', 'full'))) {
$modx->log(modX::LOG_LEVEL_ERROR,"loginResourceId found: $loginResourceId"); //<!-- expecting to see this
$modx->sendRedirect($url);
} elseif (isset($response['object']['url'])) {
$modx->log(modX::LOG_LEVEL_ERROR,"elseif...response-object-url"); //<!-- this is what's coming through in the logs
$modx->sendRedirect($response['object']['url']);
} [[!Login? &loginResourceId=`2`]]
[[!Login?loginResourceId=`2`]]
[[!Login?loginResourceId=`2` &logoutResourceId=`1`]]

[[!Login? &loginResourceId=`2`]]
[[!Login?loginResourceId=`2`]]
[[!Login?loginResourceId=`2` &logoutResourceId=`1`]]
[[!If?
&subject=`[[+modx.user.id]]`
&operator=`GT`
&operand=`1`
&then=``
&else=`[[!Login?loginResourceId=`2`&redirectToPrior=`0`]]<p class="lgnlink"><a href="[[~46]]">Forgotten Password?</a></p>`]]
[[+modx.user.id:gt=`1` :then=`[[!Login?loginResourceId=`2`&redirectToPrior=`0`]]<p class="lgnlink"><a href="[[~46]]">Forgotten Password?</a></p>` :else=`` ]]