Make so that calling two time the AppConfig.add_auth_middleware leads to the same result, also fix some tests that were working only due to previous tests setting up environment
Remove stray print