More structure, new routing, and login function.

Login is still incomplete, but this is a good stopping point.