Sleep mode and PIN Security

Added Sleep mode configuration and a PIN for security. Out of the box
the PIN is 0000 and will not require authentication. If you write a new
pin to the PIN Set attribute the PIN is saves in non-volatile memory and
you will be required to authenticate on the next startup.