added security to callback route
removed useless code
added check on environment variables
Merge remote-tracking branch 'origin/master'