Stability improvements to authentication modules for use in external scripts