Minor refactoring in Logon.ps1