Fix authentication to support CORS

STORM-862