added condition to MongoDataConnection query method and got rid of duplicate setMock in identity session controller