Converted the login to async/await and moved a lot of the account stuff into the CodeFramework