int responseStatus = response().getStatusCode();
// Only save on success and redirect status codes
if (responseStatus >= 200 && responseStatus < 400) {
SessionObject session = get("session");
if (session != null && session.isChanged()) {
store.set(sessionId, session.jsonObject(), new Handler<Object>() {
@Override
public void handle(Object error) {
if (error != null) {
// TODO: better handling of errors
System.err.println(error);