Switched string check back to .trim() when checking pin and comparing.