Modularised the auth functionality
by giving it a setting ‘auth_necessary’ that can be used to toggle authentication feature, on and off.