mosbat, it's very hard for anyone to help because you keep changing the problem but talk as if it's the same issue. You've posted in this thread about at least three different problems. The first two were explained to you (first you were interrupting with ctrl-C, and second you were not testing the return value from wait to see if the type of message you expect -- you did fix the second one, right?). Now you seem to be talking about a third problem, related to your registration screen. You have not posted any debug output or other information abput whatever problem you're having with CodeRegistrationScreen, so you should probably start with that.
--Mark