Fix frontend authentication via CORS. Please read.

Folks, let's use some common sense here. If a block of code is preceded
by a four line comment warning you to be careful with it, you should
probably either test it thoroughly (or at least flag it for review by
someone who understands it) before you change it. If you're doing global
find and replace, you should be reviewing diffs before you commit.