Refactored code. Add login functionality.