set username length max to 40, add index for password field