added user authentication and mail validation