The barking was because it was lonely!
Squirting water works but it's a bit of a pain. Diversion training works better BUT takes longer.
I had the same with my little angel. (cross collie/springer)
Taught it a new game. hunt the cherrio (the breakfast cerial!)
Once learnt, when ever I left the room, I scattered a few round the mat and the dog spent the next 20 mins looking for more! When it gave up, it headed for the dog bed and waited. On return, if no barking, add a couple of cherrio's to happy dog's face. End result, peace in my time.
Helped with it's training as it got used to using