Cleaning up code, added auth support, added better account creation.