found a way to globally manage the auth of the site with a factory