Fix that pesky xsrf bug and other stuff