Add userId generation and remote db sync.