Add database tests for user lookup