Added registration functionality.
Fixed bug with default avatars.