Extracting login menu switching logic into mainMenu