Update
Adding CSRF and a few tweaks