added cookie login support