auto-login working with cookies but still making encryption