Fixed tests to handle authentication