Fixed two nonexistent references.  Thanks, pyflakes!
Overhaul validation
Add some logging
Don't make a logged-in user log in again
Simplify control flow in /login
Log bad responses from CAS /validate