Added support for auto-login in cases where user was logged out automatically by device