more authlinking and cleanup