user controller tests and other fixes