How do I set where the user is sent from a custom login form? Is there a way to send the user to a different page than the control panel when logging in from a custom login form?

I've tried..

&lt;form method="post" action="" accept-charset="UTF-8"&gt;
    &lt;input type="hidden" name="action" value="users/login"&gt;
    &lt;input type="hidden" name="redirect" value="apply"&gt;


I've also tried setting the returnUrl session in a login event within a plugin. There's a bit left to do in the init function but you get the idea. Currently the code should redirect all logins. 

public function init()
{
    craft()-&gt;on('userSession.onLogin', function(Event $event) {
        // load the user info and determine user group
        // if part of applicant user group
        // load any existing unfinished applications
        // set a session for the unfinished application
        // redirect to /apply which should load the unfinished application
        craft()-&gt;session['returnUrl'] = "/apply";
    });
}
You can set a variable in your craft/config/general.php. Here is the option taken from the default config file which is located here craft/app/etc/config/defaults/general.php:

Updated:

/**
 * The path that users should be redirected to after logging in from the front-end site.
 *
 * This setting will also come into effect if the user visits the Login page (as specified by the loginPath config
 * setting) when they are already logged in.
 */
'postLoginRedirect' =&gt; '',


From that page you can also easily route them to another page based on conditionals in twig using {% if something %}{% redirect url %}{% endif %}. 

And although I haven't tried this personally, it looks like (based on this answer) you can redirect from within your plugin using the following (perhaps only from a controller however): 

$this-&gt;redirect('/apply');


I also see in UserSessionService.php line 371 the following which should also work:

$url = UrlHelper::getUrl(craft()-&gt;config-&gt;getLoginPath());
craft()-&gt;request-&gt;redirect($url);