Disable redirect to referer after a successful login

The redirect to the referer don't work on http version. It always redirect to homepage.
On the https version, there are too many redirects between this module and the CAS service