hoodiehq/hoodie.js — pull request #256 by gr2m (2014-03-05 13:53:32+00:00)
Title: anonymousSignUp fails if there are local changes

I'm on it. But for reference here the steps to reproduce

```js
// 1. create an anonymous account, wait until it's done
hoodie.account.anonymousSignUp().then( function() {
// 2. create an object, this will make hoodie.store.hasLocalChanges() return true
hoodie.store.add('test', {})
// 3. This will internally rename the anonymous account to the real account, that
// includes a call to `hoodie.account.signOut({silent: true})`. signOut has a check
// if there are local changes. If there are, hoodie tries to push them so no data gets
// lost on signOut. And in case that fails, it rejects the sign out. And that's what bite's us
// here. The Push fails with a 401 as the original account for the current session has
// been removed. And that makes the entire `hoodie.account.signUp()` fail with the
// akward error "HoodieUnauthorizedError: You are not authorized to access this db"
hoodie.account.signUp('username', 'password')
.done( function() { alert('Worked') })
.fail( function(error) { alert('Failed with ' + error.toString()) })
});
```

To fix that, I'll work around the signOut all together, signing in to new account does the job here