Minor improvement to create account javascript