error messages did not show up in the correct activity, and added more elegant way to post/put with json data instead of url params