pass $index to selectProject

Without this when I select a project other than the first one in the Adding Projects example, my selection is not stored in local storage.