Fix some 500s that happened on login attempts