add test for user delete and fix bug of user delete