1. Fixed problems with auth.
2. Refactoring of SyncAdapter and HttpConnector