Try changing the "authenticated" variable to false, and run the code to see what happens.