fix disconnect bug in Auth middleware