Added support for invite confirmation. Fixed invite url.

We have to pull out the signIn() function from ``LoginController`` or duplicate it. We chose to pull it out to avoid small duplication. A great lesson to learn is unless you have called a particular controller, the controller is not executed and thus its methods will not be available.