Refactor and display login