Fix two errors in python in the authentication system.

I remain baffled that the system worked at all for the last 24h.