Fixed issue where unauthorized clients could crash other clients thread