Added stop download button, fixed bug when application keeps running
after login window is closed.