Fixes based on SDK tests (fixing validation messages, error handling, cl...

...eaning up some user-related tables)