Can't set cookie from login kibana 5.4.0

Your issue is probably related to cross-origin and information related to setting CORS was given here.