fixed register form with csrf protection. Fixed several smaller issues. I know, I should not commit so many things at once...