Added calls to the ToApp and ToAdmin callbacks on the application object from within session

This is needed for applications that need to provide authentication credentials (username and password) on the Logon message, for example.

I'm not sure if this is the correct place for these calls, or if there are additional places where the calls are needed, but they allowed my application to authenticate correctly.