Use strict in chat.js too
Fixed return types and added some @return annotations
Extended apiToken condition
Added some more comments and JDoc
Fixed order of apiToken check conditions
Added TODOs for next TinyREST implementation