fixed addpost bug, added some error templates/responses