Moved functionality for user creation into it's own method