Function deleteuser is now working correctly