Simplified code. Removed LoginCtrl. Put most of the functionality into the LoginBox directive, which is where it belongs.
Merge remote-tracking branch 'origin/master'