Add a check to allow login as root

Change-Id: I24096b22a44becc5a2f6dd0edd4012fab055b3c9
Merge "Add a check to allow login as root"