New file with login defined as functions (rather than loops as in login.py)