Fixed to check whether the subject is authenticated, not whether it has a principal.
Merge pull request #196 from dgileadi/master

Fix notLoggedIn redirect check.