Add two or multiple functions in WordPress Post or Page

One option would be to create a custom page template. Within that template, you can check for POSTed variables. Something to the effect of:

<?php
/*
 * Template Name: Login form
 */
if(!empty($_POST['username'])) {
    // check credentials and if valid display data
} else {
    // display login form
}

Once you’ve created this file and uploaded it in your theme files (preferably a child theme, if you are not using a custom-built theme; save it as something like tpl-login.php for easy reference) you can create a Page in WordPress and there will be a dropdown to select the template. Select this “Login form” template, publish the page or save a draft, and you can continue editing your page template until it performs all the functions you need.