login changes

fixed login (partly)
added register support
added sql files