Windows 10 mobile device locked?

So today my Lumia 950 phone with Windows 10.0.10586.36 (Fast ring)crashed a few times and after starting it back, I saw the message below on my phone after unlocking it using the PIN:

"This device has been locked for security reasons. Connect your device to the power source for at least two hours, and then try again"

However the phone is now stuck at this screen but I’m receiving the messages, calls and other notifications but I can’t go beyond that screen and use my phone.

To solve this problem, try the following steps:

  1. Go to https://account.microsoft.com/devices on a browser
  2. Select your phone then lock it it will ask you to use a 6 digit code. The phone will lock and write goodbye.
  3. Restart it and use the code to unlock it and the message will be gone and you will be at your start screen.
    Ensure ur phone is connected to the internet during this process