fixed typo in helpers, added csrf token update on logout