add index for users, automatic routing after logging in