Updated Ajax to redirect to proper pages