Updated getAccountType, setAccountType and updateOnlineStatus into async methods.
Also made a few refactors.