Write users to db