Fixed some login and event bugs
Merge branch 'master' of https://github.com/Castcloud/Castcloud