Fixed a few bugs with the new authentication system, refs #7.