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.