Moved authorisation middleware before message store middleware

Closes #93