fix typo and add more security on API
fix some bugs and typos
Merge pull request #5616 from edx/cdodge/touchups-on-auto-registration

fix typo and add more security on API