finish index and login