changes to login
Closes #515 by sorting results for all defect trackers.
Adds missing tests
Merge with 2.1final