rewriting everything to be resource dep based and support 2fa otp input