Registration working 100%, also added User->saveToDatabase() method which inserts or updates as required.