Session extension for Flask