Added a redirect check

In case the user is not logged, the app redirects to the login main
page