Fix code generation bug and added lobby page