user.setSalt(event.getSalt());
api.login(user, new HttpCallback<Boolean>(eventBus, Boolean.class) {
@Override
public void onSuccess(Boolean result) {
if (result) {
eventBus.post(new UserAuthorizedEvent(user, false));
} else {
eventBus.post(new FailureEvent("Credentials were not recognized. Maybe you want to register?"));
}
}
});