refactored javascript
added js specs
minor refactoring after code review
added global load_hangout function and specs
moved APP_ID constant out of a module
minor refactoring