Added a check so that CAS:Client is not called more than once.

Resolved #5175, #5117, #5105.
Merge pull request #23 from TriptiSharma/dev

Added a check so that CAS:Client is not called more than once.