when record check if user it is logged in