refactoring ssAuth stuff
refactoring ssAuth stuff for Chrome App