When we lived in AK we had a cabin out in the bush on some land we owned. During the third winter after we built the cabin - there was a small black bear that would visit while we were there. Then he started visiting while we were not there. He never got in but he would come to the door - stand up and push on the door. At night we would hear him outside grunting, scuffing around - he was looking for food - I guess.
We finally had to put down a "bear board". A 4' x 4' sheet of plywood with hundreds of pneumatic staples driven thru it. Lay it down right at the threshold - outside on the porch. It only took a couple of visits after that and he never came back. Made any night time visit to the outhouse a real adventure - remembering the board was there and then avoiding it.