some backports from blog realiztion (redirect, cookies, post etc.)