Auth fixes, general cleanup.