fixed username authentication bug