Error Login Failed

Did you upgrade in one step?
If so, your migrations are not applied successfull.
You should have seen that during upgrading.

Direct upgrades from e.g. 2.x to 4.x are not possible due to technical limitations.
Roll back if you have a backup and choose smaller steps:

  1. 2.1 → 2.4
  2. 2.4 → 3.0
  3. 3.0 → 3.4
  4. 3.4 → 4.0
  5. 4.0 → 5.0 (stable)

This thread might help: