Updates to the DBapp

Set up functions to create user and thread ids