wrappers for encoding/decoding auth tokens
update identity protocol to handle token logins
change javascript implementation to optionally use requirejs