improvements to the ORM and Auth stuff