Added user login check