update token logic.
switch to https
fix syntax error.
Merge pull request #480 from optimizely/krush/leads-2

Bug fixes