changes to index and new js for login