Added `from` parameter to login.php. "login.php?from=index.php" redirects to index.php instead of mysettings.php.
Added `from` parameter to logout.php.

As with the previous commit, logout.php?from=discuss redirects to /discuss instead of the former default (index.php).
Merge commit '1eed24c738c334c898bfbd8a5d522e294be96c81' into feature/goto-previous-login

Conflicts:
	database/index.php
	discuss/index.php
	include/discuss/topic_body.php
	include/functions.php
	myaccount.php

This merged the last commit to feature/avatar (before it was merged into develop and deleted) into feature/goto-previous-login.
Fixed typo ($GET -> $_GET).
Fix infinite redirection on logout
Fixed lack of redirect in discuss.
Fixed remaining non-redirecting login pages.

activate.php, register.php, and register.js login links now redirect to /index.php.
If there is no from argument to login or logout, they will redirect to /index.php.
Redid redirection to use session cookies instead of $_GET.

- Added $_SESSION["from"] = $_SERVER["PHP_SELF"] to every page the user visits.
- Redid the login.php and logout() code to get $from from $_SESSION instead of $_GET.
Make the login links from activate.php redirect to index.php.
Remove from paramaters from login and logout links.
Merge branch 'feature/goto-previous-login' into develop

Closes #40

Conflicts:
	login.php
	myaccount.php
	notifications.php