fix client id promise/timing issue
update dist and use flash w/xdomain