Fixed a couple of hibernate session issues

1. No session was present during browserFilter execution
2. No session present during JSON rendering of message
3. Attach message to the session

Hope you are ok with the changes Stephane. You are the guru, so just let me know if I've done something wrong!