Added CSRF and XSS protection
Added missing csrf_token