WCAG 2 does not prevent you from using or relying on JavaScript.
There is no guideline that prevents it, you might refer to the concept of 'accessibility supported', but all the mainstream browsers & screen readers support JavaScript so that isn't an issue.
Matt May (author of an excellent book on accessibility) wrote pretty much the definitive response to the 'is JavaScript required' question.
What you would miss by focusing on making a site work without JavaScript would be that most people with access issues would receive the JavaScript. Therefore you need to make the JavaScript version accessible.
Aspects such as keyboard focus, ARIA and suitable HTML structure (even if created by JavaScript). I wrote an explanation of what you'd need to focus on for an accessible Angular.js implementation, but it applies for most JavaScript reliant sites.
Having said that, progressive enhancement is a useful method as some people (regardless of disability) don't receive JavaScript (about 1.1% according to the UK Government site). I know it was just an example, but requiring JavaScript for a simple login form would seem pretty lame!