added check for valid_user to the edit method in the workers controller
added the valid user check to the remaining pages and moved the valid_user method to the application controller so it could be accessed across controllers