Some minor fixes, add deleteuser and tests for it