implemented basic server functionality

that is, without crypto

- implemented certificate validation
- implemented redirect