Log out of any accounts that are logged in (if any) then close the launcher > In the cf app click the 3 vertical dots that are beside the + Create Custom Profile button > Click the Repair Installation > as soon as it is done restart your pc. Then try logging in again.
If it still fails: The launcher the CF app uses is the same one Microsoft uses. So any login issues are on their end. Be sure you are in fact logging into the Microsoft account that owns the JAVA edition of minecraft.