Fix CORS issues and parsing requests for login API.