fix output in login
fix threading in logout
add download