add index, reg and login