Extracted http auth into its own module