Code changed to use the new authentication module.