add condition for auto-login