Fix authentication flags