login bug fix, other small fixes