this is taken from https://vladimirponomarev.com/blog/authentication-in-react-apps-creating-components i blogged about this http://swyx.io/2017/What-To-Do-When-You-Hit-A-Dead-End I have some deployment notes here http://swyx.io/2017/nextproject