Fixed CSRF authentication bug