Fix login check

Skipped safety check in the login function. Fixed now.

Change-Id: I9b3cd1bbfd7154c91b0685cb43d2ccb3a64a0a4d