changed login to index and index to main