Switch to new auth API, but not complete yet