Index before and after login