Fixed a bunch of frontend / user logic.
Started converting the pages module to Eloquent as part of this.