Implement Account POST

Including a test, of course. Also, some small code shuffling.