Data model changed, refactor login business logic