Fix authentication bugs introduced by annonomous forms feature.