improving modularized authentication

Previous authentication module was just shambles; it overwrote all your html (and thus scripts); completely useless.

This one is much better, albeit requiring a few extra things