moving setting reading until after authentication is completed