Catch exception if the username is new
Tidy up imports