Implementing SSL
Refactoring to filter by Terminal when client user is role="AGP"