Add js listeners and functions for registration
Add js listeners and functions for registration

Note that many of these functions were taken directly from the
Login/js/new.js file. Only the pendingRegistration and
registrationFailure functions were modified.

privly/privly-applications,privly/privly-applications,privly/privly-applications,privly/privly-applications,privly/privly-applications