Fixing Broken Stormpath Login/Logout Tests

These commits fix the bugs which were breaking the login / logout tests.