moved login to index