fix issues with mismatch between casing in user_id retrieved from couch ...

...and es