Made login page MVVM, general cleanup

Began the process of converting everything to MVVM, starting with the
login page. While I was there, I gave the authentication manager class a
coat of paint.
I also went and cleaned up a bunch of issues pointed out by static
analysis because I'm anal.
Fixed an uncommitted refactoring change
Match current version