MongoDB Repositories and Spring security working with java config