Rewrite class hierarchy to support proper authentication