How to control redirect after login

Hi,
I noticed that after login in with the login button, it redirects the user to the homepage. How can i make it to keep the user on the same page?