with-session macro to guard protected resources