auth: Add more tests and resulting fixes to userok