Create package_adquire auth function for the future. Fix some bugs