enhanced logging per app, added warning in authenticate and test for it in unit tests