a few fixes, better login