Added extra validation to the CAS module.

Added extra validation to the cas module. Only members of a specific ad
value is allowed to access the resource.
Added extra validation to cas.
Fix after merge.
Merge pull request #3 from HaToHo/master

Added extra validation for CAS module.