Adds user login check before setting user again.