Completing loggedinuser logic