Improve the scheme handling and setting the account for a request