I have added a login form with reference to the wp-login.php.
<form name="loginform" id="loginform" action="http://domain-name/wp-login.php" method="post">
<p>
<label><?php _e('Username:') ?><br />
<input type="text" name="log" id="user_login" class="input" value="<?php echo attribute_escape(stripslashes($user_login)); ?>" size="20" tabindex="10" /></label>
</p>
<p>
<label><?php _e('Password:') ?><br />
<input type="password" name="pwd" id="user_pass" class="input" value="" size="20" tabindex="20" /></label>
</p>
<?php do_action('login_form'); ?>
<p><label><input name="rememberme" type="checkbox" id="rememberme" value="forever" tabindex="90" /> <?php _e('Remember me'); ?></label></p>
<p class="submit">
<input type="submit" name="wp-submit" id="wp-submit" value="<?php _e('Login'); ?> »" tabindex="100" />
<input type="hidden" name="redirect_to" value="<?php echo attribute_escape($redirect_to); ?>" />
</p>
</form>
However, i got a problem that it only directs to wp-login.php but not redirecting back to wp-admin.php. After i back the page, i found that the user is logged in, that means my form is working... but only not knowing to redirect to the admin panel like the normal login procedures do.
Please advice.
Thank you.