Ok thanks for clearing that up.
Yes, for connection authentication I meant user authentication, the same as what you described.
As for gmail, I guess they don't care who you are, so as long as you sign your own certificate they'll accept the connection.
Thanks.