Moved basic auth generation to main class