Added a prototype SQL log-in. Some small changes here and there.