Detect that user is not valid in replication

@hideki, any idea?

I’m thinking of the issue where the bulk-get 401 error response wasn’t being handled correctly and didn’t cause the replication to fail with an error. I know we were comparing the code for this on iOS and Java; did the same issue exist there?