Move authorization to background.js