Feature #3687 : updating slide show system for Gallery application

- adding full compliance with API token from REST Web-Services
- refactoring some code
- removing some warnings