Javascript-based password tool, preventing keylogging events