Reconfiguring the auth package to return a function.