You're supposed to only move the king while check.
Uh, what about when you can kill the piece that is checking the king? You should be able to move any piece, as long as it gets the king out of check.
Also this is awesome, I am a fan of chess myself.