Refactor Program.cs in logonserver