building user authentication and validation