add ssl in production
refactoring