Trying to fix the Internal Error 500 isssue, factored out the @secure into a SecureResource class to clean up the code some and to prevent a lot of extra boilerplate and allow for more customization later.