Added back middleware Rails Api removed and fixed admin section