// use cases I need to cover -------------------------------------------------------------------

/* 1
For example, if a user logs in from "user/login",
that would suggest to me that they're just wanting in to the site so
I'd want to redirect them to the dashboard I've created since it's intended to be their internal homepage.
However, if they were trying to access the internal forum ("internal/forum"), that's where they should go upon login.
When I turn on "Preserve destination", login from "user/login", it redirects to the user's profile page and that's it.
*/

/* 2
#1 When user 1 logs in, redirect to /admin
#2 When any other user logs in from a LoginToboggan 404-generated login form, redirect to the page the user wanted (this should also work for a User module login block)
#3 When any other user logs in at /user, redirect to
*/

/* 3
Turn on "Preserve destination" feature to make module sensible to destination parameter.
When login from the path with specified destination (ex: 'any-page?destination=node/18')
you will be taken to node/18 instead of the URL specified in login_destination settings.

$_SESSION['login_page'] was added and stores the page you were before clicking login form button.
You can use it to determine the page you logged from instead of $_GET['q'] because $_GET['q']
always equals to 'login_redirect'.
*/

// / use cases I need to cover -------------------------------------------------------------------