Some additional information:
I have tested it with Firefox in safe mode and have the same problem.
I tried using other BuddyPress themes, but the same thing happens.
If BuddyPress is disabled, then the problem doesn’t occur.
The problem does not occur if the user that is logging in does not have posting rights.
Thanks for any help.