Schema and query for user reg