fix broken login by partially reverting the last change