I've decided to move the auth code around a bit more...