Added basic auth support.