Add SSL in production
Add tests for error handling.