Example conditional to check if user is logged in or not and redirection to a page