Connected to GPIO2 is a LED which I can switch on and off via web.
When I power off the ESP it will not start correct as long as the LED is connected.
When I restart without the LED connected to GPIO2 and connect the LED after power is restored than it works ok.