update auth logic use dev or prod environment variables