improved auth provider