This set of code combines device and cancan to build a skeleton for building websites with authentication and role definitions.