Some initial work on auth code