Add API_KEY authentication, get_data should throw exception, add basic trigger, notification

*
* when there is a error on HTTP / oauth request, previously it silently
ignored by get_data leading to confusing bug. now the catch is removed
client#session now return API_KEY or SESSION_ID
Fix bug session_id header. pre-optimization is evil!