extends should come before anything else in the template. The file name in extends statement should be between quotes.
password belongs to profile.user, without which Django returns NameError as password isn't a global name.
show the username field on the form instead of name. Use the user supplied name instead of creating from datetime.