client_secret variable is defined in common.js
added realm support
Merge pull request #6 from mdetko/master

sub-realms support & client_secret