I'm not quite understanding your question. In order to run queries before a formal login, you have two options. You allow anonymous logins or you have a known system login. The latter is not generally recommended, because you have to store the password somewhere in your application.
An anonymous login is a login with null credentials. An EntityManager that isn't already logged in, will automatically attempt to login anonymously upon the first operation that involves talking to the EntityServer.
So, in your LoginManager, you return a Principal that represents an anonymous user when you get null credentials. You don't have to use a CompositionContext. You just have to write your LoginManager such that it accepts null credentials. You should then secure your entities so that an anonymous user can only query the small set of data that is ok to be queried as an anonymous user, because otherwise your server is essentially wide open and anybody can query your entire database.