Add socket authentication via tokens and cookies