change status code from 500 to 404 if no users record is found.