minor issues with validation and prepopulate query form if user is already logged in