Refactor.
Use custom callbacks for CreateAccount(), Login() and Logout() methods.

Fix the login method not returning token correctly.
Use callbacks to API derived functions.
Add a test method to SyncAPI.