/**
  * Login form with redirect url
  *
  * @return string Login form
  */
 public static function moove_login()
 {
     Moove_Controller::moove_check_redirect();
     $get_login = sanitize_text_field(wp_unslash($_GET['login']));
     $login = isset($get_login) ? esc_attr($get_login) : 0;
     $login_message = array('type' => false);
     if ($login === 'failed') {
         $login_message['type'] = 'error';
         $login_message['msg'] = __('Invalid username and/or password.', 'moove');
     } elseif ($login === 'empty') {
         $login_message['type'] = 'error';
         $login_message['msg'] = __('Username and/or Password is empty.', 'moove');
     } elseif ($login === 'false') {
         $login_message['type'] = 'info';
         $login_message['msg'] = __('You are logged out.', 'moove');
     }
     $redirect_to = esc_url_raw(wp_unslash($_GET['redirect']));
     $redirect = isset($redirect_to) ? trim(esc_url($redirect_to)) : '';
     $view_bag = array('system_message' => $login_message);
     if (trim($redirect) !== '') {
         $view_bag['redirect_to'] = $redirect;
     }
     return Moove_View::load('moove.login', $view_bag);
 }
 /**
  * Login function
  *
  * @return boolean
  */
 function moove_login()
 {
     return Moove_Controller::moove_login();
 }