set up logging file for errors, emailing logging file, error handling for dup login name