Standardization of the response status

reponses send an error code and everything is now in json