Fix cors and added authentication header