added query to login redirect, fixes #46