It depends on the application design flow,
This is what I think:
Is there a possibility that the User registered and logged in, but his details are missing in the database, in the application process?.
If its possible without an internal bug in the backend service, I think it should be 400
Or else its a bug in the backend service, Then it is 500