Make new login code py3 proof