Login redirect to previous requested page

Hey guys, i have been looking at this,

http://forums.devshed.com/php-development-5/return-to-originally-requested-page-after-being-redirected-to-login-279227.html

Wondering if this is something that can be incorporated in to phpVMS.

If you add a hidden field with redir to the form, I think that should just work

<input type=‘hidden’ name=‘redir’ value=‘/profile’ />