Fixed csrf token issues, implemented transparent csrf token handling in crails.js and layout generator.