refactored login.py; moved login.py to app.py