Simply ask him to give his password, if he gives you then problem solve otherwise if he says no then change your BF A.S.A.P. because he didn't trust on you....
I wouldn't give my girlfriend my password to my personal email account. Besides, the best thing to do is ask him about it. Hacking someone because you suspect them of cheating on you is unethical. There seems to be trust issues here and it's something that you need to talk about. And besides, if he is cheating in you then get out of the relationship. Obviously he doesn't value it enough so the only one who gets hurt in the end is you, and not him.
Looks like you are not trusting him at all?! which thing make you not to believe him other than online status?
Not possible to track YM usages without the id and and the pass. Why don't you just go and ask for them? If your BF isn't cheating, he won't mind sharing that with you.