Properly setting keys of replicated user