Added user authentication on file upload. Fixed issue with session and upload.