Refactoring account creation to allow for a configurable initial admin user

Refactored config and account creation for testability and added some tests. Also made the username for initial admin user creation into a configuration property.