title: extending the AspNetUsers with profiles and roles etc - VS2013
body: <p>I need a way of having:</p>
  
  <ul>
  <li>A super admin user that can administrate all users.</li>
  <li>A Register / Log in form that allows users to register with a username and password and log in using that too</li>
  <li>Once signed up, a way of adding further details to their profile.</li>
  </ul>
  
  <p>I know that MVC 4.0 - 5.0 has [AuthorizeAttribute] and I want to make use of Microsoft's security rather than hash my way with some crappy User table that's easy to hack at and makes other developers want to cry.</p>
  
  <p>So I can see there is a database table called <strong>AspNetUsers</strong> and in that table is an Id column. So I assume that I allow a user to register using the in-built register form... then when signed in they can use my own EF UserProfile class structure to fill in details about themselves:</p>
  
  <pre><code>public class UserProfile
  {
      [Key]
      public int Id { get; set; }
      public string UserId { get; set; } // Will link the profile to the user created by Microsofts own authentication do-raggy
      public string Email { get; set; }
      public string FirstName { get; set; }
      public string LastName { get; set; }
  }
  </code></pre>
  
  <p>Does this all sound about right  or am I missing out on some tricks?</p>
  
  <p><strong>How do I go about adding roles to users?</strong> It's all new to me (in terms of using this framework). So let's say, I need to add myself as superadmin, I need a superadmin role.</p>
  
  <p>Then I need to make it so any person can register to the application as a member role...</p>
  
  <p>Finally as a super admin, I need to be able to grant individuals who have registered as ProjectAdministrators... then I can make use of the attribute tag [Authorize(role="ProjectAdministrators")]</p>
  
  <p>I understand the logistics here but an example of adding roles to users and linking profiles to users would be spot on for me!</p>
  
  <hr>
  
  <p>What if It was an important thing to have users sign up with an email address as well as just username and password. Do I simply add columns to the AspNetUsers database table?.. where do I define the new property for the AspNetUsers model?</p>