add py2 version login_for_py2.py