fix lots of javascript errors, bake in some of the changes necessary
for the updated secure social