fix bug with login index