Login and wake from sleep seems to be two different things.
Don't know much about Apple script. Maybe you can create a script to monitor the state of SMB connection. And immediately reconnect once connection is lost.
My experience is, I can stack very high system uptime using sleep, when not using computer, but not entirely log out. Kinda hard to explain but you may get the idea.
I have an Apple script that mounts my SMB server and mounts a TimeMachine DMG in the Login Items.
But when the Mac goes to sleep and wakes up it doesn't remount the SMB, so I was thinking if it's possible to do this?