Proper cleanup of user after socket error.