refine code for posts; add additional ip logging for sessions