Fixed a few issues with login and corrected setup.sql. Rerun of setup.sql required