add function for connection user or email