Finalizes login_chdir