with further tests I verified the referrer not to be the original URL, ie it seems the original PORTAL_REDIRURL is not made available using "After authentication Redirection URL".
EDIT. Ok, my bad, the redirurl is indeed in the HTTP_REFERER.
With some minor string parsing the redirurl can be extracted and used:
$REFERER = isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : "";
$arrUrl = parse_url($REFERER);
parse_str($arrUrl['query'], $arrVar);
$redirURL=$arrVar['redirurl']