Base logout and file-upload functionality