added url handling, changed get to post, added cross origin middleware