(Joyce) Fixed KeyError bug logging in valid user