Refactored login, account creation, and CLI