Please remember that 13 weeks is very young to be holding his bladder/bowels throughout the night. If you haven't already, pick up his water after 8 pm and do your last potty break at 11ish. Puppyhood is very frustrating, I understand. If you are not crate training, you should start. Dogs usually will not soil in their crates. You state that he comes back in and pees again on your rug...make sure when you turn him out that he is completely done. Give him a little extra time. I have a girl that pee's twice before she is really DONE. Also, make sure you are cleaning the spot he pees on with an enzyme cleaner such as natures miracle otherwise he will just continue to go on that spot and will prolong house breaking. Be patient and don't ignore or show aggrivation his whining to go out...it will make him hide the fact the he has to go and more accidents will happen. Good luck...hope this helps.