in util.c, auth_stratum function
Either immediately before or immediately after the 'JSON stratum auth failed' applog, add one line:
pool->idle = true;
This correctly marks the pool as 'Dead,' after a failed stratum auth, and the next alive pool will be chosen. Because the pool is marked idle, a reconnect attempt will be made periodically. If auth is succesful, the pool is marked 'Alive,' and mining resumes.
Without this 1 liner, the pool is still seen as alive after a failed auth. So, sgminer sits and waits for work even tho the connection was not successful. (Truthfully, the connection and auth are seperate ideas in the stratum protocol, so you can connect but fail auth, in which case you did 'connect' successfully).
Note, of course, I offer this 1 line of code with no warranty whatsoever. You have been warned! ;-]