index redirect, login bug fixed