Fix login javascript by converting code to dojo 1.9