Pcsd cleanup

- Use secure secret for session hashes
- Set global/class variables in the correct places