Merge pull request #70 from ksedge/bug872533

[Bug 872533] Added basicauth middleware to all LoginAPI routes
[Bugs 873091] Add unit testing to Login.wm.o w/ Mocha
Fixed some async issues, and added more tests.
Added basicauth support for the other routes