added num_user tracking
fixed error in returning error on no connect to db
Fixed merge conflicts