Bug fixes for bugs that have to do with login and section editor
functionality. Unsure wether this introced downstream bugs or not.
SQL fixes