changed match routes to work in rails 4, made require_authentication exists call generic