Removed logging and made the server send a json object instead of a json string