Fixed Error Code Initialization Bug

Resolved a bug where the value of 'error_code' was being assigned before initialization.
Adding Preliminary Account Registration