Change auth

Don't merge yet; this is just an experimental idea of how to do authentication. 
Some of this stuff, like required, I was just playing with. This might not stay.