moving auth stuff out of resource into its own module