Added middleware authentication to controllers