fix sql error which prevents remote login from working
Merge pull request #385 from maciekczwa/master

fix sql error which prevents remote login from working