Replace ->uid() with ->id(), isAuthenticated() and isAnonymous()
applied interdiff
fix tests