creating a user with a form. also handling view opening and closing.