Refactored login page to use views