Merge pull request #295 from bhariharan/unstable20

Fix Remaining SDK Tests
Guard against NPE (occurs if logout is called when no account exists)