Refactor login page.