Disconnect clients properly and initial protocol functions