Move unauthenticated test to base class and some cleanup