[bz-1072387]  IdP does not redirect back to original SP URL when accessed via SP URL

https://bugzilla.redhat.com/show_bug.cgi?id=1072387

backported https://issues.jboss.org/browse/PLINK-379 into "master" branch for PL 2.1.x