check login URL for specific query string

Unless otherwise specified, all code here is licensed GPLv2