Using uid instead of user.id as unique identifier for user