Fix for login check