Fix the csrf meta tags generation and an identity issue