Fix error with 'Back' button after adding a programme to the record patterns.  Clean up handling of user names