Working the decoupling the auth code