Added a better way to delete users. Catched the exception for perm_list.
Created a separate function in the JS code for deleting users.