Use `getLoginName` instead of reading from the session