Initial support for multiple accounts per service and some bugfixes