Added basic auth support