Added user tests and appropriate code, as well as supporting DB migrations