application.setCurrentUser(null);
requests.userRequest().logout().fire(new Receiver<Boolean>() {
@Override
public void onSuccess(final Boolean response) {
eventBus.fireEvent(new LogoutEvent());
}
@Override
public void onFailure(final ServerFailure error) {
Cookies.removeCookie("JSESSIONID");
Cookies.removeCookie("SPRING_SECURITY_REMEMBER_ME_COOKIE");
eventBus.fireEvent(new LogoutEvent());
}
});
}