My login link uses
wp_login_url( get_permalink() ) so that the user is redirected back to the page they were viewing, and not to the dashboard.
However, this does not include query strings. So if a user was at
here.com/?page=4 they would not be redirected back to page 4.
How can I include the query string in my code?
$items .= "<li class='menu-item'> <a href=\"".wp_login_url( get_permalink() )."\">Login</a></li>";