Hooking the logistration page into the new HTTP endpoint for email opt in.

Update the PR based on Code Review comments, and additional tests.

Using underscore js
Merge pull request #6079 from edx/sanchez/logistration-opt-in

Hooking the logistration page into the new HTTP endpoint for email opt in