Bitcoin system with payins and payouts using bip32 I want to build an automated system, that can accept payments from users in bitcoin and can make payouts to addresses, specified by users, as well.

BIP32 says, that the best way to accept payments is to use HD wallets. But what about payouts? How can I make payouts using funds from account's external chain addresses with received funds and not introduce security leaks?
For some code examples, take a look at Synala -- http://synala.com/

Or on Github:  https://github.com/peterscott78/synala/

Supports watch-only BIP32 wallets, user registration, etc.  Will also gather the unspent inputs and format them into an outgoing tx, allows for offline signing, etc.

However, doesn't allow for users to automatically send funds from their account.  Due to security reasons, no private keys are stored online, and sends must be manually processed by admin.

Nonetheless, will give you some good example code to build on.  Hope that helps.