Test security token before retrieving user

If security layer is disabled for this URL, the security token is null: we need to test it.
Catch exception on isGranted()
Merge pull request #51 from winzou/patch-1

Test security token before retrieving user