fixed db connection, and added api for getting users