Normally if you setup the correct folder structure, pointing to public as document root all will work.
https://laravel.com/docs/8.x/installation#directory-configuration
The documentation also states:
Please ensure, like the configuration below, your web server directs all requests to your application's public/index.php file. You should never attempt to move the index.php file to your project's root, as serving the application from the project root will expose many sensitive configuration files to the public Internet:
https://laravel.com/docs/8.x/deployment
In your url
https://maindomain.in/projectfolder/public/login
public shouldn't be in there.
However, also run: php artisan route:clear