New check : attempt to redirect to the referring page even if $redirect_to wasn't explicitly set.
1.3
Fixed a regression (thanks Sharonq for reporting).
Plugin partially rewritten.
New check with is_ssl().
1.2
Fix for the login loop that occured when using the password recovery and when logging straight from the login page (thanks zkagen and salatfresser for reporting).
Ditch the use of HTTP_HOST for home_url().
1.1
Added code to check if $redirect_to is set and make it take precedence.