Improved Login and Registration Module

Keep log.txt in the same working directory as ts_login.py and
ts_register.py. This file temporarily stores generated IDs for login.