added check loggedinuser