Changes and fixes from the account manager

close #1
close #2
close #4
close #5
close #7
close #8
close #9
close #11
close #12
close #13
close #16
close #17