Mohsin Abbas,
the error lies in the incomplete call of wp_set_auth_cookie()
(pie-register.php 2.0.17, on line 944, 979 and 992).
You’re calling
<?php wp_set_auth_cookie( $user_id ) ?>
the correct function call is
<?php wp_set_auth_cookie( $user_id, $remember, $secure ) ?>
You need to check against <?php isset($_POST["rememberme"]); ?>
and set $remember accordingly for wp_set_auth_cookie()
.
It think this should be solved quite quickly – you’re already using the correct core function, and just need to add the parameters. For details, the codex in all it’s greatness is here to help: https://codex.wordpress.org/Function_Reference/wp_set_auth_cookie