changed login to use a custom realm
login from cookies