fixed log in bug, and some other stuff
Merge remote-tracking branch 'upstream/master'
Merge pull request #238 from jkuk/master

log in fix