refactoring: remove multiple assignments in login check