A derailed chain looks worse than it really is
Remove the battery before working on the saw
Use the onboard Allen key to loosen the two bolts in the housing
After removing the housing, the bar and chain will fall off
Lift the bar off
Rearrange the chain around the bar
Seat the chain on the gear
Drop the bar into position over the small steel pin that seats it, maintaining tension on the chain so it doesn't fall off.
Pay special attention to the diagram (in white ink) to make sure you haven't got the chain on backwards - it's easy to do! (the chain position is now correct)
As you reinstall the housing, have a helper pull on the bar to keep tension on the chain. If you don't keep tension on the chain it will end up too loose and fall off again when you start cutting.
The reinstalled chain should be nice and snug to the bar, not droopy.
Reinstall the battery