partly implemented User::save method
added logger functionality
added better error handling and logging