Centralized the authentication