I am also looking at this paper, but I am not good at writng RNN too.
1: I think each string have an EOS represents the end of the string, the RNN will only make use of information before EOS
2: 1561 is calculated by: each position has 51 possibilities(US-Keyboard+Shift+Caps+Placeholder) for 1 insertion,and you have 30 positions(since length maximum =30). Also, you have 30 positions for deletion, which is 30, and last one for EOS, which is 1, then it comes to 1561. Assume that you have a password have length = 10, the class that related to position 11 to 30 just won't be activated(if it is predicting correctly).