function signup (username, email, password) {
  return dispatch => {
    dispatch(signupRequest())
    return BackendFactory().signup({
      username: username,
      email: email,
      password: password
    })

      .then((json) => {
        return saveSessionToken(
          Object.assign({}, json,
            { username: username,
              email: email
            })
          )
          .then(() => {
            dispatch(signupSuccess(
              Object.assign({}, json,
               { username: username,
                 email: email
               })
            ))
            dispatch(logoutState())
            // navigate to Tabbar
            Actions.Tabbar()
          })
      })
      .catch((error) => {
        dispatch(signupFailure(error))
      })
  }
}
## signup
@param {string} username - name of user
@param {string} email - user's email
@param {string} password - user's password

Call the server signup and if good, save the sessionToken,
set the state to logout and signal success

Otherwise, dispatch the error so the user can see