Made the plugin compatible with the middlewares system
Fixed problem with auth needed