linking index with login