handle auth for production