Fix authentication redirect