Major bug fixes

This merge fixes a particularly nasty bug where nicknames would not be saved when creating a new account.