Make registration code optional