reconstruct login_online script