adds CORS support to allow cross-domain requests
removes old tidpost script to reduce confusion
now orders devices by name