implemented function to delete users from database