Fixed the bug when you put the phone on AC power, it should log out the
user.