fix login func in domain, return null

do not add null to database
fix