Create socket and check for identity errors automatically