Add $location as a second parameter to the unauthorizedFn callback