Feature #3839 : adding token authentication by HTTP URL request parameter

- modifying REST Web-Service authentication system
- refactoring some code
- removing some warnings