I figured it out. What happens is that my User entity gets created by a Login SLSB and put into the session. That's fine, except that now it is out of the SLSB's persistence context. If I want it to work that way I would need to make the login bean have a session context, so the User would always have a persistence context it can use.
Is this correct?
I think so :).