Why did the Russians cop such a beating in the First Chechen War?
And what/how did they fight differently to do better in te second war?
There's a large sum of info in this thread given by an expert on Chechnya:
http://www.reddit.com/r/AskHistorians/comments/1dxxob/wednesday_ama_chechnya/
Here are some highlights of the thread which may help answer your questions.
This comment chain in specific should answer your question about the First Chechen War: http://www.reddit.com/r/AskHistorians/comments/1dxxob/wednesday_ama_chechnya/c9uw9zc
This comment chain dissects one of the major battles of the First Chechen War for an indepth look at Russian mistakes: http://www.reddit.com/r/AskHistorians/comments/1dxxob/wednesday_ama_chechnya/c9uw906
Tactical Changes in the Second Chechen War: http://www.reddit.com/r/AskHistorians/comments/1dxxob/wednesday_ama_chechnya/c9uwng4
Differences in Attitude Amongst Russian Generals in the Second War: http://www.reddit.com/r/AskHistorians/comments/1dxxob/wednesday_ama_chechnya/c9uyzwx