socket stuff and auth for prod