Added proper authentication so users can login / register