fixed login issues
Merge pull request #5 from a2lin/events_logic

fixed login issues