Added redirect to previous page at user login/logout.