Added some inline docs
Some refactoring

- renaming usersecret to usertoken
- move app secret to config.json
- redis connection optimaization at gentoken