The dream DID write this song, but i remember him saying in an interview that after Britney got her hands on it they total changed the way the song was originally written by him, and he didn't like the direction. So yes the dream is the original writer. What the other people did to his song and lyrics after the fact is irrelevant . It was all the Dream in the beginning, but you know how people like to re-write certain things to get royalties.