Added file upload logic and implemented user profile