global refactoring - step 1.1: login