Some work on Github authentication

Authentication is broken (infinite redirect), and account linking doesn't work. But hopefully this was a good start!
There's still lots to do on this, but I hope this helps!