Changed login referer to use a session insteadof POST