Fix login

Sessions now work appropriately, and users can login and out.