Added code for HTTP auth