Adding basic auth functionality