Fix some stuff in the auth code, but it's still broken.