cors error when requesting from javascript

Bug

Summary

when sending a xmlHttpRequest from javascript to host:port/login a cors error is returned.

Steps to reproduce

send a reuest from javascript

current behavior

a error is returned

expected behavior

if the credentials are correct a http status 200 ok