Added registration code

App now checks if previous record exists
If record doesn't exist, create record.