It validates the user data for registration and login using joi validation and lets user access the home route if they are logedIn with a verified token generated by json wen token.