Fix user active and login check