check that new user exists in database
remove redundant code
tidy