Make replicate handle a local user

Close #77.