added deps autorun function, moves redirect api flow and key storage to user_settings