When I run your project the RED led blinks at about 1HZ, so there is really nothing for me to tell you to change.
:smileyhappy:
Also, on the GPIOB_PCOR, GPIOB_PSOR and GPIOB_PTOR register you should NOT use the 'or' operator, as these registers only change bits that are a "1", so read/modify/write is not required and could cause problems (it is ok in this case as read returns all 0's). Bits that are 0 cause no change. There are some registers that are only change on 1 that do not read back 0's. In any event, it does waste cycles.
You did a great job of figuring this out on your own.