Login model refactored