Add comments and increase legibility in login.py.