Added claim for user ID and changed commands and queries to use user ID where possible