fixed a few bugs that were introduced due to migration to cookies for csrf protection