various bugfixes, fixed login