Added secureOnly middleware