add auth support, clean up interface