fixed login function and single file downloading