Thread-safe implementation of disabling login buttons