Adds login form elements and does some refactoring of the file structure