Refactored in memory server.

Also added an extension helper to set a JWT authorization header for request made with an http client.