Added code for basic http authentication