auth logic fix and more understandable variable in config