MT: working authentication with cookies