[#74] basic authentication refactored