Fix all tests and resource authentication