Finished the view for handling the invitation.

And fix the bug about registration.