JavaScript based password strength calculator