Enable Cross Site Request Forgery protection

- Enable CsrfViewMiddleware
- Made CSRF cookie secure
- Fix membership_extended_widget to support CSRF