added some user test and database postgres changes