Added logging for production
Fixed some redirects