Remove an unused function that was confusing.
Add code to support a server login; still runs the old tests properly.
Tests for machine login and tweaks to make them run right
Merged results from conflicts because I forgot to update.