fixed an issue of not logging in due to stale sql connection. I wish it would be an c3po, but unfortunately it is not.