Completed salt and authenticate functions
Added nested auth for relevant fields