login page redirects correctly to url pointed by next parameter