WIP: Fix/validate wallet before routing

This PR includes:
- Validate if a wallet is open before routing (from routes.js)
- Refactor of service socket
- Improved socket handler

Important: Don't merge yet.