Look up into the code of Login. Maybe you have been put some code to auto log out.
I think that the problem you put your code into global.php. It involked before auth involked.
Make sure that name of input is correct? :)
We'd like to thank these amazing companies for supporting us
The Laravel portal for problem solving, knowledge sharing and community building.