added robust database testing for users
merged