login functionality

redid the index file into all javascript creating elements that are
necessary for the page