Fix macOS login issue