fixed up routes, added condition to application_controller