Added login check for user