[api] Improved ledger semantics
[hooks] Added ledger transaction id to deposit and withdrawals
[tests] Use transaction id. Begin to separate integration tests from unit tests
[view] Minor style adjustment. Fix redirect.