Examples: fixed nil pointer errors

Thanks for the library, seems very handy to me. Tinkering around I noticed a minor bug in the user service / repository examples: the server response code is never 404, always 500.