Formatting, typos and fix for #141

Bunch of formatting and typo fixes, plus resolution of:
"cannot log back in on IE after logging out"
Moved cache-control header in common authentication service outside of a
check on browser implementation dependent variable HTTP_ORIGIN, so requests
always return no-cache headers.