server allows cross site requests. fixed the way the server receives and returns json to match REST