fix login bug and upload bug